Class ResultImpl
- java.lang.Object
-
- com.sun.identity.xacml.context.impl.ResultImpl
-
- All Implemented Interfaces:
Result
public class ResultImpl extends Object implements Result
TheResultelement contains decision, status and obligations per resource id schema<xs:complexType name="ResultType"> <xs:sequence> <xs:element ref="xacml-context:Decision"/> <xs:element ref="xacml-context:Status" minOccurs="0"/> <xs:element ref="xacml:Obligations" minOccurs="0"/> <xs:sequence> <xs:attribute name="ResourceId" type="xs:string" use="optional"/> <xs:complexType>
-
-
Constructor Summary
Constructors Constructor Description ResultImpl()Constructs aResultobjectResultImpl(String xml)Constructs aResultobject from an XML stringResultImpl(Element element)Constructs aResultobject from an XML DOM element
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DecisiongetDecision()Returns theDecisionof this objectObligationsgetObligations()Returns theObligationsof this objectStringgetResourceId()ReturnsresourceIdof this objectStatusgetStatus()Returns theStatusof this objectbooleanisMutable()Checks if the object is mutablevoidmakeImmutable()Makes the object immutablevoidsetDecision(Decision decision)Sets theDecisionof this objectvoidsetObligations(Obligations obligations)Sets theObligationsof this objectvoidsetResourceId(String resourceId)SetsresourceIdof this objectvoidsetStatus(Status status)Sets theStatusof this objectStringtoXMLString()Returns a string representation of this objectStringtoXMLString(boolean includeNSPrefix, boolean declareNS)Returns a string representation of this object
-
-
-
Constructor Detail
-
ResultImpl
public ResultImpl() throws XACMLExceptionConstructs aResultobject- Throws:
XACMLException
-
ResultImpl
public ResultImpl(String xml) throws XACMLException
Constructs aResultobject from an XML string- Parameters:
xml- string representing aResultobject- Throws:
SAMLException- if the XML string could not be processedXACMLException
-
ResultImpl
public ResultImpl(Element element) throws XACMLException
Constructs aResultobject from an XML DOM element- Parameters:
element- XML DOM element representing aResultobject- Throws:
SAMLException- if the DOM element could not be processedXACMLException
-
-
Method Detail
-
getResourceId
public String getResourceId()
ReturnsresourceIdof this object- Specified by:
getResourceIdin interfaceResult- Returns:
resourceIdof this object
-
setResourceId
public void setResourceId(String resourceId) throws XACMLException
SetsresourceIdof this object- Specified by:
setResourceIdin interfaceResult- Parameters:
resourceId-resourceIdof this object- Throws:
XACMLException- if the object is immutable
-
getDecision
public Decision getDecision()
Returns theDecisionof this object- Specified by:
getDecisionin interfaceResult- Returns:
- the
Decisionof this object
-
setDecision
public void setDecision(Decision decision) throws XACMLException
Sets theDecisionof this object- Specified by:
setDecisionin interfaceResult- Throws:
XACMLException- if the object is immutable
-
getStatus
public Status getStatus()
Returns theStatusof this object
-
setStatus
public void setStatus(Status status) throws XACMLException
Sets theStatusof this object- Specified by:
setStatusin interfaceResult- Throws:
XACMLException- if the object is immutable
-
getObligations
public Obligations getObligations()
Returns theObligationsof this object- Specified by:
getObligationsin interfaceResult- Returns:
- the
Obligationsof this object
-
setObligations
public void setObligations(Obligations obligations) throws XACMLException
Sets theObligationsof this object- Specified by:
setObligationsin interfaceResult- Parameters:
obligations-Obligationsto set- Throws:
XACMLException- if the object is immutable
-
toXMLString
public String toXMLString() throws XACMLException
Returns a string representation of this object- Specified by:
toXMLStringin interfaceResult- Returns:
- a string representation of this object
- Throws:
XACMLException- if conversion fails for any reason
-
toXMLString
public String toXMLString(boolean includeNSPrefix, boolean declareNS) throws XACMLException
Returns a string representation of this object- Specified by:
toXMLStringin interfaceResult- 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 of this object
- Throws:
XACMLException- if conversion fails for any reason
-
isMutable
public boolean isMutable()
Checks if the object is mutable
-
makeImmutable
public void makeImmutable()
Makes the object immutable- Specified by:
makeImmutablein interfaceResult
-
-