|
SunTM's XACML Implementation for JavaTM | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.xacml.Target
Represents the TargetType XML type in XACML. This also stores several other XML types: Subjects, Resources, and Actions. The target is used to quickly identify whether the parent element (a policy set, policy, or rule) is applicable to a given request.
Constructor Summary | |
Target(List subjects,
List resources,
List actions)
Constructor that creates a Target from components. |
Method Summary | |
void |
encode(OutputStream output)
Encodes this Target into its XML representation and writes
this encoding to the given OutputStream with no
indentation. |
void |
encode(OutputStream output,
Indenter indenter)
Encodes this Target into its XML representation and writes
this encoding to the given OutputStream with
indentation. |
List |
getActions()
Returns an unmodifiable List that represents the Actions
section of this target. |
static Target |
getInstance(Node root,
String xpathVersion)
Creates a Target by parsing a node. |
List |
getResources()
Returns an unmodifiable List that represents the Resources
section of this target. |
List |
getSubjects()
Returns an unmodifiable List that represents the Subjects
section of this target. |
MatchResult |
match(EvaluationCtx context)
Determines whether this Target matches
the input request (whether it is applicable). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Target(List subjects, List resources, List actions)
Target
from components.
subjects
- A List
containing the subjects or null
if this represents AnySubject. The list is of the
form described in getSubjects
.resources
- A List
containing the resources or null
if this represents AnyResource The list is of the
form described in getResources
.actions
- A List
containing the actions or null
if this represents AnyAction The list is of the
form described in getActions
.Method Detail |
public static Target getInstance(Node root, String xpathVersion) throws ParsingException
Target
by parsing a node.
root
- the node to parse for the Target
xpathVersion
- the XPath version to use in any selectors, or
null if this is unspecified (ie, not supplied in
the defaults section of the policy)
Target
constructed by parsing
ParsingException
- if the DOM node is invalidpublic List getSubjects()
List
that represents the Subjects
section of this target. Each entry in the List
is
another List
that represents the Subject section. In turn,
each of these List
s contains TargetMatch
objects that represent SubjectMatch XML structures.
Note that future versions of this code may use intermediary classes to make the structure clearer, but this depends on the future structure of XACML Targets.
public List getResources()
List
that represents the Resources
section of this target. Each entry in the List
is
another List
that represents the Resource section. In turn,
each of these List
s contains TargetMatch
objects that represent ResourceMatch XML structures.
Note that future versions of this code may use intermediary classes to make the structure clearer, but this depends on the future structure of XACML Targets.
public List getActions()
List
that represents the Actions
section of this target. Each entry in the List
is
another List
that represents the Action section. In turn,
each of these List
s contains TargetMatch
objects that represent ActionMatch XML structures.
Note that future versions of this code may use intermediary classes to make the structure clearer, but this depends on the future structure of XACML Targets.
public MatchResult match(EvaluationCtx context)
Target
matches
the input request (whether it is applicable).
context
- the representation of the request
public void encode(OutputStream output)
Target
into its XML representation and writes
this encoding to the given OutputStream
with no
indentation.
output
- a stream into which the XML-encoded data is writtenpublic void encode(OutputStream output, Indenter indenter)
Target
into its XML representation and writes
this encoding to the given OutputStream
with
indentation.
output
- a stream into which the XML-encoded data is writtenindenter
- an object that creates indentation strings
|
Sun's XACML Implementation Version 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.