Class ResponseImpl
- java.lang.Object
-
- com.sun.identity.xacml.context.impl.ResponseImpl
-
- All Implemented Interfaces:
Response
public class ResponseImpl extends Object implements Response
TheResponse
element is a container of one or moreResult
s 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 aResponse
objectResponseImpl(String xml)
Constructs aResponse
object from an XML stringResponseImpl(Element element)
Constructs aResponse
object from an XML DOM element
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addResult(Result result)
Adds aResult
to this objectList
getResults()
Returns theResult
s of this objectboolean
isMutable()
Checks if the object is mutablevoid
makeImmutable()
Makes the object immutablevoid
setResults(List values)
Sets theResult
s of this objectString
toXMLString()
Returns a string representation of this objectString
toXMLString(boolean includeNSPrefix, boolean declareNS)
Returns a string representation of this object
-
-
-
Constructor Detail
-
ResponseImpl
public ResponseImpl()
Constructs aResponse
object
-
ResponseImpl
public ResponseImpl(String xml) throws XACMLException
Constructs aResponse
object from an XML string- Parameters:
xml
- string representing aResponse
object- Throws:
SAMLException
- if the XML string could not be processedXACMLException
-
ResponseImpl
public ResponseImpl(Element element) throws XACMLException
Constructs aResponse
object from an XML DOM element- Parameters:
element
- XML DOM element representing aResponse
object- Throws:
SAMLException
- if the DOM element could not be processedXACMLException
-
-
Method Detail
-
getResults
public List getResults()
Returns theResult
s of this object- Specified by:
getResults
in interfaceResponse
- Returns:
- the
Result
s of this object
-
setResults
public void setResults(List values) throws XACMLException
Sets theResult
s of this object- Specified by:
setResults
in interfaceResponse
- Parameters:
values
- theResult
s of this object.- Throws:
XACMLException
- if the object is immutable.
-
addResult
public void addResult(Result result) throws XACMLException
Adds aResult
to this object- Specified by:
addResult
in interfaceResponse
- Parameters:
result
- theResult
to add- Throws:
XACMLException
- if the object is immutable
-
toXMLString
public String toXMLString() throws XACMLException
Returns a string representation of this object- Specified by:
toXMLString
in 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:
toXMLString
in 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:
makeImmutable
in interfaceResponse
-
-