Class ObligationImpl

java.lang.Object
com.sun.identity.xacml.policy.impl.ObligationImpl
All Implemented Interfaces:
XmlSerializable, 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 Details

    • 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 Details

    • 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
    • setFulfillOn

      public void setFulfillOn(String fulfillOn) throws XACMLException
      Sets the FullFillOn effect type of this obligation
      Specified by:
      setFulfillOn in interface Obligation
      Parameters:
      fulfillOn - FullFillOn effect type of this obligation
      Throws:
      XACMLException
    • 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
    • toDocumentFragment

      public DocumentFragment toDocumentFragment(Document document, boolean includeNSPrefix, boolean declareNS) throws com.sun.identity.saml2.common.SAML2Exception
      Description copied from interface: XmlSerializable
      Serializes the element into an XML DocumentFragment. A default implementation is provided for compatibility with legacy code that implements XmlSerializable.toXMLString(), but it is highly recommended to override this method.
      Specified by:
      toDocumentFragment in interface XmlSerializable
      Parameters:
      document - the parent Document to create the document fragment from.
      includeNSPrefix - whether to include a namespace prefix in the document elements.
      declareNS - whether to declare any namespaces or assume that they are already declared.
      Returns:
      the XML document fragment representing this SAML2 element.
      Throws:
      com.sun.identity.saml2.common.SAML2Exception - if the element cannot be serialized 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