Class ObligationImpl

  • All Implemented Interfaces:
    Obligation

    @SupportedAll
    public class ObligationImpl
    extends Object
    implements Obligation
    The Obligation element is a container of one or more AttributeAssignments issuded by authorization authority.
    • Constructor Detail

      • ObligationImpl

        public ObligationImpl()
        Default constructor
      • ObligationImpl

        public ObligationImpl​(String xml)
                       throws XACMLException
        This constructor is used to build Obligation object from an XML string.
        Parameters:
        xml - a String representation of Obligation object
        Throws:
        XACMLException - if it could not process the XML string
      • ObligationImpl

        public ObligationImpl​(Element element)
                       throws XACMLException
        This constructor is used to build ObligationImpl object from a block of existing XML that has already been built into a DOM.
        Parameters:
        element - DOM tree for Request object
        Throws:
        XACMLException - If it could not process the Element.
    • Method Detail

      • getObligationId

        public URI getObligationId()
        Returns the ObligationId of this Obligation
        Specified by:
        getObligationId in interface Obligation
        Returns:
        the URI representing ObligationId of this Obligation
      • setObligationId

        public void setObligationId​(URI obligationId)
                             throws XACMLException
        Sets the ObligationId of the Obligation
        Specified by:
        setObligationId in interface Obligation
        Parameters:
        obligationId - URI representing the ObligationId.
        Throws:
        XACMLException - if the object is immutable
      • getFulfillOn

        public String getFulfillOn()
        Returns the FullFillOn effect type of this obligation
        Specified by:
        getFulfillOn in interface Obligation
        Returns:
        the FullFillOn effect type of this obligation
      • getAttributeAssignments

        public List getAttributeAssignments()
        Returns XML elements corresponding to AttributeAssignment elements for this obligation.
        Specified by:
        getAttributeAssignments in interface Obligation
        Returns:
        the XML elements corresponding to AttributeAssignment elements for this obligation.
      • setAttributeAssignments

        public void setAttributeAssignments​(List attributeAssignments)
                                     throws XACMLException
        Sets XML elements corresponding to AttributeAssignment elements for this obligation.
        Specified by:
        setAttributeAssignments in interface Obligation
        Parameters:
        attributeAssignments - XML elements corresponding to AttributeAssignment elements for this obligation.
        Throws:
        XACMLException
      • toXMLString

        public String toXMLString​(boolean includeNSPrefix,
                                  boolean declareNS)
                           throws XACMLException
        Returns a string representation of this object
        Specified by:
        toXMLString in interface Obligation
        Parameters:
        includeNSPrefix - Determines whether or not the namespace qualifier is prepended to the Element when converted
        declareNS - Determines whether or not the namespace is declared within the Element.
        Returns:
        a string representation
        Throws:
        XACMLException - if conversion fails for any reason
      • makeImmutable

        public void makeImmutable()
        Makes this object immutable
        Specified by:
        makeImmutable in interface Obligation
      • isMutable

        public boolean isMutable()
        Checks if this object is mutable
        Specified by:
        isMutable in interface Obligation
        Returns:
        true if the object is mutable, false otherwise