Class ObligationsImpl
java.lang.Object
com.sun.identity.xacml.policy.impl.ObligationsImpl
- All Implemented Interfaces:
XmlSerializable
,Obligations
The
Obligations
element is a container of
one or more Obligation
s issuded by
authorization authority.-
Field Summary
Fields inherited from interface com.sun.identity.xacml.policy.Obligations
OBLIGATIONS_ELEMENT
-
Constructor Summary
ConstructorDescriptionDefault constructorObligationsImpl
(String xml) Constructs anObligationsImpl
object from an XML stringObligationsImpl
(Element element) Constructs anObligationsImpl
object from an XML DOM element -
Method Summary
Modifier and TypeMethodDescriptionvoid
addObligation
(Obligation obligation) Adds anObligation
to this object.Returns theObligation
objects set in thisObligations
boolean
Checks if this object is mutablevoid
Makes this object immutablevoid
setObligations
(List obligations) Sets theObligation
objects of thisObligations
toDocumentFragment
(Document document, boolean includeNSPrefix, boolean declareNS) Serializes the element into an XMLDocumentFragment
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sun.identity.xacml.policy.Obligations
toXMLString, toXMLString
-
Constructor Details
-
ObligationsImpl
public ObligationsImpl()Default constructor -
ObligationsImpl
Constructs anObligationsImpl
object from an XML string- Parameters:
xml
- string representing anObligationsImpl
object- Throws:
XACMLException
- if the XML string could not be processed
-
ObligationsImpl
Constructs anObligationsImpl
object from an XML DOM element- Parameters:
element
- XML DOM element representing aObligationsImpl
object.- Throws:
XACMLException
- If the DOM element could not be processed.
-
-
Method Details
-
getObligations
Returns theObligation
objects set in thisObligations
- Specified by:
getObligations
in interfaceObligations
- Returns:
- the
Obligation
objects set in thisObligations
-
setObligations
Sets theObligation
objects of thisObligations
- Specified by:
setObligations
in interfaceObligations
- Parameters:
obligations
- theObligation
objects to set in thisObligations
- Throws:
XACMLException
- if the object is immutable.
-
addObligation
Adds anObligation
to this object.- Specified by:
addObligation
in interfaceObligations
- Parameters:
obligation
- theObligation
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 XMLDocumentFragment
. A default implementation is provided for compatibility with legacy code that implementsXmlSerializable.toXMLString()
, but it is highly recommended to override this method.- Specified by:
toDocumentFragment
in interfaceXmlSerializable
- Parameters:
document
- the parentDocument
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 interfaceObligations
-
isMutable
public boolean isMutable()Checks if this object is mutable- Specified by:
isMutable
in interfaceObligations
- Returns:
true
if the object is mutable,false
otherwise
-