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
Results. |
| 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
Results 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
Results. 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 ResponseTypeResponseCtxParsingException - 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 versionResponseCtxParsingException - if the node is invalidpublic Set<AbstractResult> getResults()
Results from this response.Set of resultspublic String encode()
ResponseCtx into its XML formStringpublic void encode(StringBuilder builder)
ResponseCtx into its XML form and writes this out to the provided
StringBuilderbuilder - string stream into which the XML-encoded data is writtenCopyright © 2021 WSO2. All rights reserved.