public class TargetSection extends Object
TargetMatchGroup
and represents the Subjects, Resources, Actions, and Environments
sections of an XACML Target. This section may apply to any request.Constructor and Description |
---|
TargetSection(List<TargetMatchGroup> matchGroups,
int matchType,
int xacmlVersion)
Constructor that takes a group and a version.
|
Modifier and Type | Method and Description |
---|---|
String |
encode()
Encodes this
TargetSection into its XML form |
void |
encode(StringBuilder builder)
Encodes this
TargetSection into its XML form and writes this out to the provided
StringBuilder |
static TargetSection |
getInstance(Node root,
int matchType,
PolicyMetaData metaData)
Creates a
Target by parsing a node. |
List |
getMatchGroups()
Returns the
TargetMatchGroup s contained in this group. |
MatchResult |
match(EvaluationCtx context)
Determines whether this
TargetSection matches
the input request (whether it is applicable). |
boolean |
matchesAny()
Returns whether this section matches any request.
|
public TargetSection(List<TargetMatchGroup> matchGroups, int matchType, int xacmlVersion)
matchGroups
- a possibly null List
of
TargetMatchGroup
smatchType
- the type as defined in TargetMatch
xacmlVersion
- the version XACML being usedpublic static TargetSection getInstance(Node root, int matchType, PolicyMetaData metaData) throws ParsingException
Target
by parsing a node.root
- the node to parse for the Target
matchType
- the type as defined in TargetMatch
metaData
- the meta-data from the enclosing policyTarget
constructed by parsingParsingException
- if the DOM node is invalidpublic List getMatchGroups()
TargetMatchGroup
s contained in this group.List
of TargetMatchGroup
spublic boolean matchesAny()
public MatchResult match(EvaluationCtx context)
TargetSection
matches
the input request (whether it is applicable).context
- the representation of the requestpublic String encode()
TargetSection
into its XML formString
public void encode(StringBuilder builder)
TargetSection
into its XML form and writes this out to the provided
StringBuilder
builder
- string stream into which the XML-encoded data is writtenCopyright © 2015 WSO2. All rights reserved.