Class ObligationImpl
- java.lang.Object
-
- com.sun.identity.xacml.policy.impl.ObligationImpl
-
- All Implemented Interfaces:
XmlSerializable
,Obligation
@SupportedAll public class ObligationImpl extends Object implements Obligation
TheObligation
element is a container of one or moreAttributeAssignment
s issuded by authorization authority.
-
-
Constructor Summary
Constructors Constructor Description ObligationImpl()
Default 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List
getAttributeAssignments()
Returns XML elements corresponding toAttributeAssignment
elements for this obligation.String
getFulfillOn()
Returns the FullFillOn effect type of this obligationURI
getObligationId()
Returns the ObligationId of thisObligation
boolean
isMutable()
Checks if this object is mutablevoid
makeImmutable()
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
DocumentFragment
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 Detail
-
ObligationImpl
public ObligationImpl()
Default constructor
-
ObligationImpl
public ObligationImpl(String xml) throws XACMLException
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
public ObligationImpl(Element element) throws XACMLException
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 Detail
-
getObligationId
public URI getObligationId()
Returns the ObligationId of thisObligation
- Specified by:
getObligationId
in interfaceObligation
- Returns:
- the
URI
representing ObligationId of thisObligation
-
setObligationId
public void setObligationId(URI obligationId) throws XACMLException
Sets the ObligationId of theObligation
- Specified by:
setObligationId
in interfaceObligation
- Parameters:
obligationId
-URI
representing the ObligationId.- Throws:
XACMLException
- if the object is immutable
-
getFulfillOn
public String getFulfillOn()
Returns the FullFillOn effect type of this obligation- Specified by:
getFulfillOn
in interfaceObligation
- Returns:
- the FullFillOn effect type of this obligation
-
setFulfillOn
public void setFulfillOn(String fulfillOn) throws XACMLException
Sets the FullFillOn effect type of this obligation- Specified by:
setFulfillOn
in interfaceObligation
- Parameters:
fulfillOn
- FullFillOn effect type of this obligation- Throws:
XACMLException
-
getAttributeAssignments
public List 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
public void setAttributeAssignments(List attributeAssignments) throws XACMLException
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 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:
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
-
-