|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.security.xacml.sunxacml.Target
public class Target
Represents the TargetType XML type in XACML. This also stores several other XML types: Subjects, Resources, Actions, and Environments (in XACML 2.0 and later). 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(TargetSection subjectsSection,
TargetSection resourcesSection,
TargetSection actionsSection)
Constructor that creates an XACML 1.x Target from
components. |
|
Target(TargetSection subjectsSection,
TargetSection resourcesSection,
TargetSection actionsSection,
TargetSection environmentsSection)
Constructor that creates an XACML 2.0 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. |
TargetSection |
getActionsSection()
Returns the Actions section of this Target. |
TargetSection |
getEnvironmentsSection()
Returns the Environments section of this Target. |
static Target |
getInstance(Node root,
PolicyMetaData metaData)
Creates a Target by parsing a node. |
static Target |
getInstance(Node root,
String xpathVersion)
Deprecated. As of 2.0 you should avoid using this method and should instead use the version that takes a PolicyMetaData instance. This method will
only work for XACML 1.x policies. |
TargetSection |
getResourcesSection()
Returns the Resources section of this Target. |
TargetSection |
getSubjectsSection()
Returns the Subjects section of this Target. |
MatchResult |
match(EvaluationCtx context)
Determines whether this Target matches
the input request (whether it is applicable). |
boolean |
matchesAny()
Returns whether or not this Target matches any request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Target(TargetSection subjectsSection,
TargetSection resourcesSection,
TargetSection actionsSection)
Target from
components. Each of the sections must be non-null, but they may match
any request. Because this is only used for 1.x Targets, there is no
Environments section.
subjectsSection - a TargetSection representing
the Subjects section of this targetresourcesSection - a TargetSection representing
the Resources section of this targetactionsSection - a TargetSection representing
the Actions section of this target
public Target(TargetSection subjectsSection,
TargetSection resourcesSection,
TargetSection actionsSection,
TargetSection environmentsSection)
Target from
components. Each of the sections must be non-null, but they may
match any request.
subjectsSection - a TargetSection representing
the Subjects section of this targetresourcesSection - a TargetSection representing
the Resources section of this targetactionsSection - a TargetSection representing
the Actions section of this targetenvironmentsSection - a TargetSection representing
the Environments section of this target| Method Detail |
|---|
public static Target getInstance(Node root,
String xpathVersion)
throws ParsingException
PolicyMetaData instance. This method will
only work for XACML 1.x policies.
Target by parsing a node.
root - the node to parse for the TargetxpathVersion - 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 invalid
public static Target getInstance(Node root,
PolicyMetaData metaData)
throws ParsingException
Target by parsing a node.
root - the node to parse for the Target
Target constructed by parsing
ParsingException - if the DOM node is invalidpublic TargetSection getSubjectsSection()
TargetSection representing the Subjectspublic TargetSection getResourcesSection()
TargetSection representing the Resourcespublic TargetSection getActionsSection()
TargetSection representing the Actionspublic TargetSection getEnvironmentsSection()
TargetSection representing the Environmentspublic boolean matchesAny()
Target matches any request.
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 written
public 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||