public class RequestCtx extends AbstractRequestCtx
attributesSet, documentRoot, isSearch, xacmlVersion
Constructor and Description |
---|
RequestCtx(Set<Attributes> attributesSet,
Node documentRoot)
Constructor that creates a
RequestCtx from components. |
RequestCtx(Set<Attributes> attributesSet,
Node documentRoot,
int version)
Constructor that creates a
RequestCtx from components. |
RequestCtx(Set<Attributes> attributesSet,
Node documentRoot,
Set<Subject> subjects,
Set<Attribute> resource,
Set<Attribute> action,
Set<Attribute> environment,
String resourceContent)
Constructor that creates a
RequestCtx from components. |
RequestCtx(Set<Attributes> attributesSet,
Node documentRoot,
String resourceContent)
Constructor that creates a
RequestCtx from components. |
RequestCtx(Set<Attributes> attributesSet,
String resourceContent)
Constructor that creates a
RequestCtx from components. |
RequestCtx(Set<Subject> subjects,
Set<Attribute> resource,
Set<Attribute> action,
Set<Attribute> environment) |
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. |
Set |
getAction()
Returns a
Set containing Attribute objects. |
Node |
getDocumentRoot()
Returns the root DOM node of the document used to create this object, or null if this object
was created by hand (ie, not through the
getInstance method) or if the root node
was not provided to the constructor. |
Set |
getEnvironmentAttributes()
Returns a
Set containing Attribute objects. |
static RequestCtx |
getInstance(Node root)
Create a new
RequestCtx by parsing a node. |
Set |
getResource()
Returns a
Set containing Attribute objects. |
Set |
getSubjects()
Returns a
Set containing Subject objects. |
getAttributesSet, getXacmlVersion, isSearch, setSearch, setXacmlVersion
public RequestCtx(Set<Attributes> attributesSet, Node documentRoot)
RequestCtx
from components.public RequestCtx(Set<Attributes> attributesSet, Node documentRoot, int version)
RequestCtx
from components.documentRoot
- the root node of the DOM tree for this requestversion
- xacml version of the requestpublic RequestCtx(Set<Attributes> attributesSet, String resourceContent)
RequestCtx
from components.resourceContent
- a text-encoded version of the content, suitable for including in the
RequestType, including the root RequestContent
nodepublic RequestCtx(Set<Attributes> attributesSet, Node documentRoot, String resourceContent) throws IllegalArgumentException
RequestCtx
from components.attributesSet
- documentRoot
- the root node of the DOM tree for this requestresourceContent
- a text-encoded version of the content, suitable for including in the
RequestType, including the root RequestContent
nodeIllegalArgumentException
- if the inputs are not well formedpublic RequestCtx(Set<Subject> subjects, Set<Attribute> resource, Set<Attribute> action, Set<Attribute> environment) throws IllegalArgumentException
subjects
- resource
- action
- environment
- IllegalArgumentException
public RequestCtx(Set<Attributes> attributesSet, Node documentRoot, Set<Subject> subjects, Set<Attribute> resource, Set<Attribute> action, Set<Attribute> environment, String resourceContent) throws IllegalArgumentException
RequestCtx
from components.attributesSet
- documentRoot
- the root node of the DOM tree for this requestresourceContent
- a text-encoded version of the content, suitable for including in the
RequestType, including the root RequestContent
nodeIllegalArgumentException
- 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 Set getSubjects()
Set
containing Subject
objects.public Set getResource()
Set
containing Attribute
objects.public Set getAction()
Set
containing Attribute
objects.public Set getEnvironmentAttributes()
Set
containing Attribute
objects.public Node getDocumentRoot()
getInstance
method) or if the root node
was not provided to the constructor.getDocumentRoot
in class AbstractRequestCtx
public 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 writtenpublic 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 stringsCopyright © 2021 WSO2. All rights reserved.