Class ResponseImpl
- java.lang.Object
-
- com.sun.identity.xacml.context.impl.ResponseImpl
-
- All Implemented Interfaces:
Response
public class ResponseImpl extends Object implements Response
TheResponseelement is a container of one or moreResults issuded by authorization authority. schema:<xs:complexType name="ResponseType"> <xs:sequence> <xs:element ref="xacml-context:Result" maxOccurs="unbounded"/> <xs:sequence> <xs:complexType>
-
-
Constructor Summary
Constructors Constructor Description ResponseImpl()Constructs aResponseobjectResponseImpl(String xml)Constructs aResponseobject from an XML stringResponseImpl(Element element)Constructs aResponseobject from an XML DOM element
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddResult(Result result)Adds aResultto this objectListgetResults()Returns theResults of this objectbooleanisMutable()Checks if the object is mutablevoidmakeImmutable()Makes the object immutablevoidsetResults(List values)Sets theResults of this objectStringtoXMLString()Returns a string representation of this objectStringtoXMLString(boolean includeNSPrefix, boolean declareNS)Returns a string representation of this object
-
-
-
Constructor Detail
-
ResponseImpl
public ResponseImpl()
Constructs aResponseobject
-
ResponseImpl
public ResponseImpl(String xml) throws XACMLException
Constructs aResponseobject from an XML string- Parameters:
xml- string representing aResponseobject- Throws:
SAMLException- if the XML string could not be processedXACMLException
-
ResponseImpl
public ResponseImpl(Element element) throws XACMLException
Constructs aResponseobject from an XML DOM element- Parameters:
element- XML DOM element representing aResponseobject- Throws:
SAMLException- if the DOM element could not be processedXACMLException
-
-
Method Detail
-
getResults
public List getResults()
Returns theResults of this object- Specified by:
getResultsin interfaceResponse- Returns:
- the
Results of this object
-
setResults
public void setResults(List values) throws XACMLException
Sets theResults of this object- Specified by:
setResultsin interfaceResponse- Parameters:
values- theResults of this object.- Throws:
XACMLException- if the object is immutable.
-
addResult
public void addResult(Result result) throws XACMLException
Adds aResultto this object- Specified by:
addResultin interfaceResponse- Parameters:
result- theResultto add- Throws:
XACMLException- if the object is immutable
-
toXMLString
public String toXMLString() throws XACMLException
Returns a string representation of this object- Specified by:
toXMLStringin interfaceResponse- 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 interfaceResponse- 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 interfaceResponse
-
-