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
TheObligationelement is a container of one or moreAttributeAssignments issuded by authorization authority.
-
-
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 theObligationDocumentFragmenttoDocumentFragment(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 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:
XACMLException- If it could not process the Element.
-
-
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
-
toDocumentFragment
public DocumentFragment toDocumentFragment(Document document, boolean includeNSPrefix, boolean declareNS) throws 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:
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
-
-