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 AttributeAssignment
s issuded by
authorization authority.-
Constructor Summary
ConstructorDescriptionDefault constructorObligationImpl
(String xml) This constructor is used to buildObligation
object from an XML string.ObligationImpl
(Element element) This constructor is used to buildObligationImpl
object from a block of existing XML that has already been built into a DOM. -
Method Summary
Modifier and TypeMethodDescriptionReturns XML elements corresponding toAttributeAssignment
elements for this obligation.Returns the FullFillOn effect type of this obligationReturns the ObligationId of thisObligation
boolean
Checks if this object is mutablevoid
Makes this object immutablevoid
setAttributeAssignments
(List attributeAssignments) Sets XML elements corresponding toAttributeAssignment
elements for this obligation.void
setFulfillOn
(String fulfillOn) Sets the FullFillOn effect type of this obligationvoid
setObligationId
(URI obligationId) Sets the ObligationId of theObligation
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.Obligation
toXMLString, toXMLString
-
Constructor Details
-
ObligationImpl
public ObligationImpl()Default constructor -
ObligationImpl
This constructor is used to buildObligation
object from an XML string.- Parameters:
xml
- aString
representation ofObligation
object- Throws:
XACMLException
- if it could not process the XML string
-
ObligationImpl
This constructor is used to buildObligationImpl
object from a block of existing XML that has already been built into a DOM.- Parameters:
element
- DOM tree forRequest
object- Throws:
XACMLException
- If it could not process the Element.
-
-
Method Details
-
getObligationId
Returns the ObligationId of thisObligation
- Specified by:
getObligationId
in interfaceObligation
- Returns:
- the
URI
representing ObligationId of thisObligation
-
setObligationId
Sets the ObligationId of theObligation
- Specified by:
setObligationId
in interfaceObligation
- Parameters:
obligationId
-URI
representing the ObligationId.- Throws:
XACMLException
- if the object is immutable
-
getFulfillOn
Returns the FullFillOn effect type of this obligation- Specified by:
getFulfillOn
in interfaceObligation
- Returns:
- the FullFillOn effect type of this obligation
-
setFulfillOn
Sets the FullFillOn effect type of this obligation- Specified by:
setFulfillOn
in interfaceObligation
- Parameters:
fulfillOn
- FullFillOn effect type of this obligation- Throws:
XACMLException
-
getAttributeAssignments
Returns XML elements corresponding toAttributeAssignment
elements for this obligation.- Specified by:
getAttributeAssignments
in interfaceObligation
- Returns:
- the XML elements corresponding to
AttributeAssignment
elements for this obligation.
-
setAttributeAssignments
Sets XML elements corresponding toAttributeAssignment
elements for this obligation.- Specified by:
setAttributeAssignments
in interfaceObligation
- Parameters:
attributeAssignments
- XML elements corresponding toAttributeAssignment
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 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 interfaceObligation
-
isMutable
public boolean isMutable()Checks if this object is mutable- Specified by:
isMutable
in interfaceObligation
- Returns:
true
if the object is mutable,false
otherwise
-