Class ObligationsImpl
- java.lang.Object
-
- com.sun.identity.xacml.policy.impl.ObligationsImpl
-
- All Implemented Interfaces:
Obligations
@SupportedAll public class ObligationsImpl extends Object implements Obligations
TheObligations
element is a container of one or moreObligation
s issuded by authorization authority.
-
-
Field Summary
-
Fields inherited from interface com.sun.identity.xacml.policy.Obligations
OBLIGATIONS_ELEMENT
-
-
Constructor Summary
Constructors Constructor Description ObligationsImpl()
Default constructorObligationsImpl(String xml)
Constructs anObligationsImpl
object from an XML stringObligationsImpl(Element element)
Constructs anObligationsImpl
object from an XML DOM element
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addObligation(Obligation obligation)
Adds anObligation
to this object.List
getObligations()
Returns theObligation
objects set in thisObligations
boolean
isMutable()
Checks if this object is mutablevoid
makeImmutable()
Makes this object immutablevoid
setObligations(List obligations)
Sets theObligation
objects of thisObligations
String
toXMLString()
Returns a string representation of this objectString
toXMLString(boolean includeNSPrefix, boolean declareNS)
Returns a string representation of this object
-
-
-
Constructor Detail
-
ObligationsImpl
public ObligationsImpl()
Default constructor
-
ObligationsImpl
public ObligationsImpl(String xml) throws XACMLException
Constructs anObligationsImpl
object from an XML string- Parameters:
xml
- string representing anObligationsImpl
object- Throws:
XACMLException
- if the XML string could not be processed
-
ObligationsImpl
public ObligationsImpl(Element element) throws XACMLException
Constructs anObligationsImpl
object from an XML DOM element- Parameters:
element
- XML DOM element representing aObligationsImpl
object.- Throws:
XACMLException
- If the DOM element could not be processed.
-
-
Method Detail
-
getObligations
public List getObligations()
Returns theObligation
objects set in thisObligations
- Specified by:
getObligations
in interfaceObligations
- Returns:
- the
Obligation
objects set in thisObligations
-
setObligations
public void setObligations(List obligations) throws XACMLException
Sets theObligation
objects of thisObligations
- Specified by:
setObligations
in interfaceObligations
- Parameters:
obligations
- theObligation
objects to set in thisObligations
- Throws:
XACMLException
- if the object is immutable.
-
addObligation
public void addObligation(Obligation obligation) throws XACMLException
Adds anObligation
to this object.- Specified by:
addObligation
in interfaceObligations
- Parameters:
obligation
- theObligation
to add.- Throws:
XACMLException
- if the object is immutable.
-
toXMLString
public String toXMLString(boolean includeNSPrefix, boolean declareNS) throws XACMLException
Returns a string representation of this object- Specified by:
toXMLString
in interfaceObligations
- 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 interfaceObligations
- Returns:
- a string representation
- Throws:
XACMLException
- if conversion fails for any reason
-
makeImmutable
public void makeImmutable()
Makes this object immutable- Specified by:
makeImmutable
in interfaceObligations
-
isMutable
public boolean isMutable()
Checks if this object is mutable- Specified by:
isMutable
in interfaceObligations
- Returns:
true
if the object is mutable,false
otherwise
-
-