org.wso2.balana.xacml2
Class TargetMatchGroup

java.lang.Object
  extended by org.wso2.balana.xacml2.TargetMatchGroup

public class TargetMatchGroup
extends Object

This class contains a group of TargetMatch instances and represents the Subject, Resource, Action, and Environment elements in an XACML Target.

Since:
2.0
Author:
Seth Proctor

Constructor Summary
TargetMatchGroup(List<TargetMatch> matchElements, int matchType)
          Constructor that creates a new TargetMatchGroup based on the given elements.
 
Method Summary
 String encode()
          Encodes this TargetMatchGroup into its XML form
 void encode(StringBuilder builder)
          Encodes this TargetMatchGroup into its XML form and writes this out to the provided StringBuilder
static TargetMatchGroup getInstance(Node root, int matchType, PolicyMetaData metaData)
          Creates a Target based on its DOM node.
 MatchResult match(EvaluationCtx context)
          Determines whether this TargetMatchGroup 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

TargetMatchGroup

public TargetMatchGroup(List<TargetMatch> matchElements,
                        int matchType)
Constructor that creates a new TargetMatchGroup based on the given elements.

Parameters:
matchElements - a List of TargetMatch
matchType - the match type as defined in TargetMatch
Method Detail

getInstance

public static TargetMatchGroup getInstance(Node root,
                                           int matchType,
                                           PolicyMetaData metaData)
                                    throws ParsingException
Creates a Target based on its DOM node.

Parameters:
root - the node to parse for the target group
matchType - the type of the match
metaData - meta-date associated with the policy
Returns:
a new TargetMatchGroup constructed by parsing
Throws:
ParsingException - if the DOM node is invalid

match

public MatchResult match(EvaluationCtx context)
Determines whether this TargetMatchGroup matches the input request (whether it is applicable).

Parameters:
context - the representation of the request
Returns:
the result of trying to match the group with the context

encode

public String encode()
Encodes this TargetMatchGroup into its XML form

Returns:
String

encode

public void encode(StringBuilder builder)
Encodes this TargetMatchGroup into its XML form and writes this out to the provided StringBuilder

Parameters:
builder - string stream into which the XML-encoded data is written


Copyright © 2015 WSO2. All rights reserved.