Class ObligationImpl
- java.lang.Object
-
- com.sun.identity.xacml.policy.impl.ObligationImpl
-
- All Implemented Interfaces:
Obligation
public class ObligationImpl extends Object implements Obligation
TheObligationelement is a container of one or moreAttributeAssignments issuded by authorization authority.<xs:element name="Obligation" type="xacml:ObligationType"/> <xs:complexType name="ObligationType"> <xs:sequence> <xs:element ref="xacml:AttributeAssignment" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="ObligationId" type="xs:anyURI" use="required"/> <xs:attribute name="FulfillOn" type="xacml:EffectType" use="required"/> </xs:complexType> </xs:element>
-
-
Constructor Summary
Constructors Constructor Description ObligationImpl()Default 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListgetAttributeAssignments()Returns XML elements corresponding toAttributeAssignmentelements for this obligation.StringgetFulfillOn()Returns the FullFillOn effect type of this obligationURIgetObligationId()Returns the ObligationId of thisObligationbooleanisMutable()Checks if this object is mutablevoidmakeImmutable()Makes 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 theObligationStringtoXMLString()Returns a string representation of this objectStringtoXMLString(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 buildObligationobject from an XML string.- Parameters:
xml- aStringrepresentation ofObligationobject- Throws:
XACMLException- if it could not process the XML string
-
ObligationImpl
public ObligationImpl(Element element) throws XACMLException
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:
XACML2Exception- if it could not process the ElementXACMLException
-
-
Method Detail
-
getObligationId
public URI getObligationId()
Returns the ObligationId of thisObligation- Specified by:
getObligationIdin interfaceObligation- Returns:
- the
URIrepresenting ObligationId of thisObligation
-
setObligationId
public void setObligationId(URI obligationId) throws XACMLException
Sets the ObligationId of theObligation- Specified by:
setObligationIdin interfaceObligation- Parameters:
obligationId-URIrepresenting the ObligationId.- Throws:
XACMLException- if the object is immutable
-
getFulfillOn
public String getFulfillOn()
Returns the FullFillOn effect type of this obligation- Specified by:
getFulfillOnin 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:
setFulfillOnin interfaceObligation- Parameters:
fulfillOn- FullFillOn effect type of this obligation- Throws:
XACMLException
-
getAttributeAssignments
public List getAttributeAssignments()
Returns XML elements corresponding toAttributeAssignmentelements for this obligation.- Specified by:
getAttributeAssignmentsin interfaceObligation- Returns:
- the XML elements corresponding to
AttributeAssignmentelements for this obligation.
-
setAttributeAssignments
public void setAttributeAssignments(List attributeAssignments) throws XACMLException
Sets XML elements corresponding toAttributeAssignmentelements for this obligation.- Specified by:
setAttributeAssignmentsin interfaceObligation- Parameters:
attributeAssignments- XML elements corresponding toAttributeAssignmentelements for this obligation.- Throws:
XACMLException
-
toXMLString
public String toXMLString(boolean includeNSPrefix, boolean declareNS) throws XACMLException
Returns a string representation of this object- Specified by:
toXMLStringin 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:
toXMLStringin interfaceObligation- Returns:
- a string representation
- Throws:
XACMLException- if conversion fails 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
-
-