public class ResponseCtx extends Object
Constructor and Description |
---|
ResponseCtx(AbstractResult result)
Constructor that creates a new
ResponseCtx with only a single
Result (a common case). |
ResponseCtx(Set<AbstractResult> results,
int version)
Constructor that creates a new
ResponseCtx with a Set of
Result s. |
Modifier and Type | Method and Description |
---|---|
String |
encode()
Encodes this
ResponseCtx into its XML form |
void |
encode(StringBuilder builder)
Encodes this
ResponseCtx into its XML form and writes this out to the provided
StringBuilder |
static ResponseCtx |
getInstance(Node root)
Creates a new instance of
ResponseCtx based on the given
DOM root node. |
static ResponseCtx |
getInstance(Node root,
int version)
Creates a new instance of
ResponseCtx based on the given
DOM root node. |
Set<AbstractResult> |
getResults()
Get the set of
Result s from this response. |
public ResponseCtx(AbstractResult result)
ResponseCtx
with only a single
Result
(a common case).result
- the single result in the responsepublic ResponseCtx(Set<AbstractResult> results, int version)
ResponseCtx
with a Set
of
Result
s. The Set
must be non-empty.results
- a Set
of Result
objectsversion
- XACML versionpublic static ResponseCtx getInstance(Node root) throws ParsingException
ResponseCtx
based on the given
DOM root node. A ParsingException
is thrown if the DOM
root doesn't represent a valid ResponseType.root
- the DOM root of a ResponseTypeResponseCtx
ParsingException
- if the node is invalidpublic static ResponseCtx getInstance(Node root, int version) throws ParsingException
ResponseCtx
based on the given
DOM root node. A ParsingException
is thrown if the DOM
root doesn't represent a valid ResponseType.root
- the DOM root of a ResponseTypeversion
- XACML versionResponseCtx
ParsingException
- if the node is invalidpublic Set<AbstractResult> getResults()
Result
s from this response.Set
of resultspublic String encode()
ResponseCtx
into its XML formString
public void encode(StringBuilder builder)
ResponseCtx
into its XML form and writes this out to the provided
StringBuilder
builder
- string stream into which the XML-encoded data is writtenCopyright © 2021 WSO2. All rights reserved.