public class RequestCtx extends AbstractRequestCtx
attributesSet, documentRoot, isSearch, xacmlVersion
Constructor and Description |
---|
RequestCtx(Node documentRoot,
Set<Attributes> attributesSet,
boolean returnPolicyIdList,
boolean combinedDecision,
MultiRequests multiRequests,
RequestDefaults defaults)
Constructor that creates a
RequestCtx from components. |
RequestCtx(Set<Attributes> attributesSet,
Node documentRoot)
Constructor that creates a
RequestCtx from components. |
Modifier and Type | Method and Description |
---|---|
void |
encode(OutputStream output)
Encodes this
AbstractRequestCtx into its XML representation and writes this encoding to the given
OutputStream . |
void |
encode(OutputStream output,
Indenter indenter)
Encodes this
AbstractRequestCtx into its XML representation and writes this encoding to the given
OutputStream with indentation. |
RequestDefaults |
getDefaults()
Returns a
RequestDefaults that encapsulates RequestDefaults element in request |
static RequestCtx |
getInstance(Node root)
Create a new
RequestCtx by parsing a node. |
MultiRequests |
getMultiRequests()
Returns a
MultiRequests that encapsulates MultiRequests element in request |
boolean |
isCombinedDecision()
Returns a
boolean value whether to combine decisions or not |
boolean |
isReturnPolicyIdList()
Returns a
boolean value whether to send back policy list of not |
getAttributesSet, getDocumentRoot, getXacmlVersion, isSearch, setSearch, setXacmlVersion
public RequestCtx(Set<Attributes> attributesSet, Node documentRoot)
RequestCtx
from components.attributesSet
- a Set
of Attributes
sdocumentRoot
- the root node of the DOM tree for this requestIllegalArgumentException
- if the inputs are not well formedpublic RequestCtx(Node documentRoot, Set<Attributes> attributesSet, boolean returnPolicyIdList, boolean combinedDecision, MultiRequests multiRequests, RequestDefaults defaults) throws IllegalArgumentException
RequestCtx
from components.documentRoot
- the root node of the DOM tree for this requestattributesSet
- a Set
of Attributes
sreturnPolicyIdList
- a boolean
value whether to send back policy list of notcombinedDecision
- a boolean
value whether to combine decisions or notmultiRequests
- a MultiRequests
for the MultiRequests element in requestdefaults
- a RequestDefaults
for the RequestDefaults element in requestIllegalArgumentException
- if the inputs are not well formedpublic static RequestCtx getInstance(Node root) throws ParsingException
RequestCtx
by parsing a node. This node should be created by
schema-verified parsing of an XML
document.root
- the node to parse for the RequestCtx
RequestCtx
constructed by parsingParsingException
- if the DOM node is invalidpublic boolean isCombinedDecision()
boolean
value whether to combine decisions or notpublic boolean isReturnPolicyIdList()
boolean
value whether to send back policy list of notpublic MultiRequests getMultiRequests()
MultiRequests
that encapsulates MultiRequests element in requestpublic RequestDefaults getDefaults()
RequestDefaults
that encapsulates RequestDefaults element in requestpublic void encode(OutputStream output, Indenter indenter)
AbstractRequestCtx
into its XML representation and writes this encoding to the given
OutputStream
with indentation.encode
in class AbstractRequestCtx
output
- a stream into which the XML-encoded data is writtenindenter
- an object that creates indentation stringspublic void encode(OutputStream output)
AbstractRequestCtx
into its XML representation and writes this encoding to the given
OutputStream
. No indentation is used.encode
in class AbstractRequestCtx
output
- a stream into which the XML-encoded data is writtenCopyright © 2021 WSO2. All rights reserved.