Class ObligationsImpl

java.lang.Object
com.sun.identity.xacml.policy.impl.ObligationsImpl
All Implemented Interfaces:
XmlSerializable, Obligations

@SupportedAll public class ObligationsImpl extends Object implements Obligations
The Obligations element is a container of one or more Obligations issuded by authorization authority.
  • Constructor Details

    • ObligationsImpl

      public ObligationsImpl()
      Default constructor
    • ObligationsImpl

      public ObligationsImpl(String xml) throws XACMLException
      Constructs an ObligationsImpl object from an XML string
      Parameters:
      xml - string representing an ObligationsImpl object
      Throws:
      XACMLException - if the XML string could not be processed
    • ObligationsImpl

      public ObligationsImpl(Element element) throws XACMLException
      Constructs an ObligationsImpl object from an XML DOM element
      Parameters:
      element - XML DOM element representing a ObligationsImpl object.
      Throws:
      XACMLException - If the DOM element could not be processed.
  • Method Details

    • getObligations

      public List getObligations()
      Returns the Obligation objects set in this Obligations
      Specified by:
      getObligations in interface Obligations
      Returns:
      the Obligation objects set in this Obligations
    • setObligations

      public void setObligations(List obligations) throws XACMLException
      Sets the Obligation objects of this Obligations
      Specified by:
      setObligations in interface Obligations
      Parameters:
      obligations - the Obligation objects to set in this Obligations
      Throws:
      XACMLException - if the object is immutable.
    • addObligation

      public void addObligation(Obligation obligation) throws XACMLException
      Adds an Obligation to this object.
      Specified by:
      addObligation in interface Obligations
      Parameters:
      obligation - the Obligation to add.
      Throws:
      XACMLException - if the object is immutable.
    • 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 Obligations
    • isMutable

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