public class RequestCtx extends Object
| Constructor and Description |
|---|
RequestCtx(List subjects,
List resource,
List action,
List environment)
Constructor that creates a
RequestCtx from components. |
RequestCtx(List subjects,
List resource,
List action,
List environment,
Node documentRoot)
Constructor that creates a
RequestCtx from components. |
RequestCtx(List subjects,
List resource,
List action,
List environment,
Node documentRoot,
String resourceContent)
Constructor that creates a
RequestCtx from components. |
RequestCtx(Set subjects,
Set resource,
Set action,
Set environment,
Node documentRoot)
Constructor that creates a
RequestCtx from components. |
RequestCtx(Set subjects,
Set resource,
Set action,
Set environment,
Node documentRoot,
String resourceContent)
Constructor that creates a
RequestCtx from components. |
RequestCtx(Set subjects,
Set resource,
Set action,
Set environment,
String resourceContent)
Constructor that creates a
RequestCtx from components. |
| Modifier and Type | Method and Description |
|---|---|
void |
encode(OutputStream output)
Encodes this context into its XML representation and writes this
encoding to the given
OutputStream. |
void |
encode(OutputStream output,
Indenter indenter)
Encodes this context into its XML representation and writes
this encoding to the given
OutputStream with
indentation. |
void |
encode(OutputStream output,
Indenter indenter,
String nsURI) |
void |
encode(OutputStream output,
String nsURI) |
boolean |
equals(Object obj) |
Set |
getAction()
Deprecated.
|
List |
getActionAsList()
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()
Deprecated.
|
List |
getEnvironmentAttributesAsList()
Returns a
Set containing Attribute objects. |
static RequestCtx |
getInstance(InputStream input)
Creates a new
RequestCtx by parsing XML from an
input stream. |
static RequestCtx |
getInstance(Node root)
Create a new
RequestCtx by parsing a node. |
Set |
getResource()
Deprecated.
|
List |
getResourceAsList()
Returns a
Set containing Attribute objects. |
Set |
getSubjects()
Deprecated.
|
List |
getSubjectsAsList()
Returns a
Set containing Subject objects. |
int |
hashCode() |
public RequestCtx(List subjects, List resource, List action, List environment)
RequestCtx from components.subjects - a Set of Subjectsresource - a Set of Attributesaction - a Set of Attributesenvironment - a Set of environment attributespublic RequestCtx(Set subjects, Set resource, Set action, Set environment, Node documentRoot)
RequestCtx from components.subjects - a Set of Subjectsresource - a Set of Attributesaction - a Set of Attributesenvironment - a Set of environment attributesdocumentRoot - the root node of the DOM tree for this requestpublic RequestCtx(List subjects, List resource, List action, List environment, Node documentRoot)
RequestCtx from components.subjects - a Set of Subjectsresource - a Set of Attributesaction - a Set of Attributesenvironment - a Set of environment attributesdocumentRoot - the root node of the DOM tree for this requestpublic RequestCtx(Set subjects, Set resource, Set action, Set environment, String resourceContent)
RequestCtx from components.subjects - a Set of Subjectsresource - a Set of Attributesaction - a Set of Attributesenvironment - a Set of environment attributesresourceContent - a text-encoded version of the content, suitable
for including in the RequestType, including the
root RequestContent nodepublic RequestCtx(Set subjects, Set resource, Set action, Set environment, Node documentRoot, String resourceContent) throws IllegalArgumentException
RequestCtx from components.subjects - a Set of Subjectsresource - a Set of Attributesaction - a Set of Attributesenvironment - a Set of environment attributesdocumentRoot - 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(List subjects, List resource, List action, List environment, Node documentRoot, String resourceContent) throws IllegalArgumentException
RequestCtx from components.subjects - a Set of Subjectsresource - a Set of Attributesaction - a Set of Attributesenvironment - a Set of environment attributesdocumentRoot - 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 RequestCtxRequestCtx constructed by parsingURISyntaxException - if there is a badly formed URIParsingException - if the DOM node is invalidpublic static RequestCtx getInstance(InputStream input) throws ParsingException
RequestCtx by parsing XML from an
input stream. Note that this a convenience method, and it will
not do schema validation by default. You should be parsing the data
yourself, and then providing the root node to the other
getInstance method. If you use this convenience
method, you probably want to turn on validation by setting the
context schema file (see the programmer guide for more information
on this).input - a stream providing the XML dataRequestCtxParserException - if there is an error parsing the inputParsingExceptionpublic 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 List getSubjectsAsList()
Set containing Subject objects.public List getResourceAsList()
Set containing Attribute objects.public List getActionAsList()
Set containing Attribute objects.public List getEnvironmentAttributesAsList()
Set containing Attribute objects.public Node getDocumentRoot()
getInstance method) or if the root node was not
provided to the constructor.public void encode(OutputStream output)
OutputStream. No
indentation is used.output - a stream into which the XML-encoded data is writtenpublic void encode(OutputStream output, String nsURI)
public void encode(OutputStream output, Indenter indenter)
OutputStream with
indentation.output - a stream into which the XML-encoded data is writtenindenter - an object that creates indentation stringspublic void encode(OutputStream output, Indenter indenter, String nsURI)
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.