Class ObligationImpl
java.lang.Object
com.sun.identity.xacml.policy.impl.ObligationImpl
- All Implemented Interfaces:
XmlSerializable,Obligation
The
Obligation element is a container of
one or more AttributeAssignments issuded by
authorization authority.-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorObligationImpl(String xml) This constructor is used to buildObligationobject from an XML string.ObligationImpl(Element element) This constructor is used to buildObligationImplobject from a block of existing XML that has already been built into a DOM. -
Method Summary
Modifier and TypeMethodDescriptionReturns XML elements corresponding toAttributeAssignmentelements for this obligation.Returns the FullFillOn effect type of this obligationReturns the ObligationId of thisObligationbooleanChecks if this object is mutablevoidMakes this object immutablevoidsetAttributeAssignments(List attributeAssignments) Sets XML elements corresponding toAttributeAssignmentelements for this obligation.voidsetFulfillOn(String fulfillOn) Sets the FullFillOn effect type of this obligationvoidsetObligationId(URI obligationId) Sets the ObligationId of theObligationtoDocumentFragment(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, waitMethods inherited from interface com.sun.identity.xacml.policy.Obligation
toXMLString, toXMLString
-
Constructor Details
-
ObligationImpl
public ObligationImpl()Default constructor -
ObligationImpl
This constructor is used to buildObligationobject from an XML string.- Parameters:
xml- aStringrepresentation ofObligationobject- Throws:
XACMLException- if it could not process the XML string
-
ObligationImpl
This constructor is used to buildObligationImplobject from a block of existing XML that has already been built into a DOM.- Parameters:
element- DOM tree forRequestobject- Throws:
XACMLException- If it could not process the Element.
-
-
Method Details
-
getObligationId
Returns the ObligationId of thisObligation- Specified by:
getObligationIdin interfaceObligation- Returns:
- the
URIrepresenting ObligationId of thisObligation
-
setObligationId
Sets the ObligationId of theObligation- Specified by:
setObligationIdin interfaceObligation- Parameters:
obligationId-URIrepresenting the ObligationId.- Throws:
XACMLException- if the object is immutable
-
getFulfillOn
Returns the FullFillOn effect type of this obligation- Specified by:
getFulfillOnin interfaceObligation- Returns:
- the FullFillOn effect type of this obligation
-
setFulfillOn
Sets the FullFillOn effect type of this obligation- Specified by:
setFulfillOnin interfaceObligation- Parameters:
fulfillOn- FullFillOn effect type of this obligation- Throws:
XACMLException
-
getAttributeAssignments
Returns XML elements corresponding toAttributeAssignmentelements for this obligation.- Specified by:
getAttributeAssignmentsin interfaceObligation- Returns:
- the XML elements corresponding to
AttributeAssignmentelements for this obligation.
-
setAttributeAssignments
Sets XML elements corresponding toAttributeAssignmentelements for this obligation.- Specified by:
setAttributeAssignmentsin interfaceObligation- Parameters:
attributeAssignments- XML elements corresponding toAttributeAssignmentelements 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: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:
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:
makeImmutablein interfaceObligation
-
isMutable
public boolean isMutable()Checks if this object is mutable- Specified by:
isMutablein interfaceObligation- Returns:
trueif the object is mutable,falseotherwise
-