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
TheObligationselement is a container of one or moreObligations issuded by authorization authority.
-
-
Field Summary
-
Fields inherited from interface com.sun.identity.xacml.policy.Obligations
OBLIGATIONS_ELEMENT
-
-
Constructor Summary
Constructors Constructor Description ObligationsImpl()Default constructorObligationsImpl(String xml)Constructs anObligationsImplobject from an XML stringObligationsImpl(Element element)Constructs anObligationsImplobject from an XML DOM element
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddObligation(Obligation obligation)Adds anObligationto this object.ListgetObligations()Returns theObligationobjects set in thisObligationsbooleanisMutable()Checks if this object is mutablevoidmakeImmutable()Makes this object immutablevoidsetObligations(List obligations)Sets theObligationobjects of thisObligationsDocumentFragmenttoDocumentFragment(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 Detail
-
ObligationsImpl
public ObligationsImpl()
Default constructor
-
ObligationsImpl
public ObligationsImpl(String xml) throws XACMLException
Constructs anObligationsImplobject from an XML string- Parameters:
xml- string representing anObligationsImplobject- Throws:
XACMLException- if the XML string could not be processed
-
ObligationsImpl
public ObligationsImpl(Element element) throws XACMLException
Constructs anObligationsImplobject from an XML DOM element- Parameters:
element- XML DOM element representing aObligationsImplobject.- Throws:
XACMLException- If the DOM element could not be processed.
-
-
Method Detail
-
getObligations
public List getObligations()
Returns theObligationobjects set in thisObligations- Specified by:
getObligationsin interfaceObligations- Returns:
- the
Obligationobjects set in thisObligations
-
setObligations
public void setObligations(List obligations) throws XACMLException
Sets theObligationobjects of thisObligations- Specified by:
setObligationsin interfaceObligations- Parameters:
obligations- theObligationobjects to set in thisObligations- Throws:
XACMLException- if the object is immutable.
-
addObligation
public void addObligation(Obligation obligation) throws XACMLException
Adds anObligationto this object.- Specified by:
addObligationin interfaceObligations- Parameters:
obligation- theObligationto add.- Throws:
XACMLException- if the object is immutable.
-
toDocumentFragment
public DocumentFragment toDocumentFragment(Document document, boolean includeNSPrefix, boolean declareNS) throws SAML2Exception
Description copied from interface:XmlSerializableSerializes 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:
toDocumentFragmentin interfaceXmlSerializable- Parameters:
document- the parentDocumentto 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:
SAML2Exception- if the element cannot be serialized for any reason.
-
makeImmutable
public void makeImmutable()
Makes this object immutable- Specified by:
makeImmutablein interfaceObligations
-
isMutable
public boolean isMutable()
Checks if this object is mutable- Specified by:
isMutablein interfaceObligations- Returns:
trueif the object is mutable,falseotherwise
-
-