Class ObligationImpl
- java.lang.Object
-
- com.sun.identity.xacml.policy.impl.ObligationImpl
-
- All Implemented Interfaces:
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
String
toXMLString()
Returns a string representation of this objectString
toXMLString(boolean includeNSPrefix, boolean declareNS)
Returns a string representation of this object
-
-
-
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
-
toXMLString
public String toXMLString(boolean includeNSPrefix, boolean declareNS) throws XACMLException
Returns a string representation of this object- Specified by:
toXMLString
in interfaceObligation
- Parameters:
includeNSPrefix
- Determines whether or not the namespace qualifier is prepended to the Element when converteddeclareNS
- Determines whether or not the namespace is declared within the Element.- Returns:
- a string representation
- Throws:
XACMLException
- if conversion fails for any reason
-
toXMLString
public String toXMLString() throws XACMLException
Returns a string representation of this object- Specified by:
toXMLString
in interfaceObligation
- Returns:
- a string representation
- Throws:
XACMLException
- if conversion fails 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
-
-