Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sun.xacml
Class TargetMatch  view TargetMatch download TargetMatch.java

java.lang.Object
  extended bycom.sun.xacml.TargetMatch

public class TargetMatch
extends java.lang.Object

Represents the SubjectMatch, ResourceMatch, or ActionMatch XML types in XACML, depending on the value of the type field. This is the part of the Target that actually evaluates whether the specified attribute values in the Target match the corresponding attribute values in the request context.

Since:
1.0

Field Summary
static int ACTION
          An integer value indicating that this class represents an ActionMatch
private  com.sun.xacml.attr.AttributeValue attrValue
           
private  com.sun.xacml.cond.Evaluatable eval
           
private  com.sun.xacml.cond.Function function
           
static int RESOURCE
          An integer value indicating that this class represents a ResourceMatch
static int SUBJECT
          An integer value indicating that this class represents a SubjectMatch
private  int type
           
 
Constructor Summary
TargetMatch(int type, com.sun.xacml.cond.Function function, com.sun.xacml.cond.Evaluatable eval, com.sun.xacml.attr.AttributeValue attrValue)
          Constructor that creates a TargetMatch from components.
 
Method Summary
 void encode(java.io.OutputStream output)
          Encodes this TargetMatch into its XML representation and writes this encoding to the given OutputStream with no indentation.
 void encode(java.io.OutputStream output, Indenter indenter)
          Encodes this TargetMatch into its XML representation and writes this encoding to the given OutputStream with indentation.
private  MatchResult evaluateMatch(java.util.List inputs, EvaluationCtx context)
          Private helper that evaluates an individual match.
static TargetMatch getInstance(org.w3c.dom.Node root, java.lang.String prefix, java.lang.String xpathVersion)
          Creates a TargetMatch by parsing a node, using the input prefix to determine whether this is a SubjectMatch, ResourceMatch, or ActionMatch.
 com.sun.xacml.cond.Evaluatable getMatchEvaluatable()
          Returns the AttributeDesignator or AttributeSelector used by the matching function.
 com.sun.xacml.cond.Function getMatchFunction()
          Returns the Function used to do the matching.
 com.sun.xacml.attr.AttributeValue getMatchValue()
          Returns the AttributeValue used by the matching function.
 int getType()
          Returns the type of this TargetMatch, either SUBJECT, RESOURCE, or ACTION.
 MatchResult match(EvaluationCtx context)
          Determines whether this TargetMatch 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
 

Field Detail

SUBJECT

public static final int SUBJECT
An integer value indicating that this class represents a SubjectMatch

See Also:
Constant Field Values

RESOURCE

public static final int RESOURCE
An integer value indicating that this class represents a ResourceMatch

See Also:
Constant Field Values

ACTION

public static final int ACTION
An integer value indicating that this class represents an ActionMatch

See Also:
Constant Field Values

type

private int type

function

private com.sun.xacml.cond.Function function

eval

private com.sun.xacml.cond.Evaluatable eval

attrValue

private com.sun.xacml.attr.AttributeValue attrValue
Constructor Detail

TargetMatch

public TargetMatch(int type,
                   com.sun.xacml.cond.Function function,
                   com.sun.xacml.cond.Evaluatable eval,
                   com.sun.xacml.attr.AttributeValue attrValue)
            throws java.lang.IllegalArgumentException
Constructor that creates a TargetMatch from components.

Method Detail

getInstance

public static TargetMatch getInstance(org.w3c.dom.Node root,
                                      java.lang.String prefix,
                                      java.lang.String xpathVersion)
                               throws ParsingException,
                                      java.lang.IllegalArgumentException
Creates a TargetMatch by parsing a node, using the input prefix to determine whether this is a SubjectMatch, ResourceMatch, or ActionMatch.


getType

public int getType()
Returns the type of this TargetMatch, either SUBJECT, RESOURCE, or ACTION.


getMatchFunction

public com.sun.xacml.cond.Function getMatchFunction()
Returns the Function used to do the matching.


getMatchValue

public com.sun.xacml.attr.AttributeValue getMatchValue()
Returns the AttributeValue used by the matching function.


getMatchEvaluatable

public com.sun.xacml.cond.Evaluatable getMatchEvaluatable()
Returns the AttributeDesignator or AttributeSelector used by the matching function.


match

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


evaluateMatch

private MatchResult evaluateMatch(java.util.List inputs,
                                  EvaluationCtx context)
Private helper that evaluates an individual match.


encode

public void encode(java.io.OutputStream output)
Encodes this TargetMatch into its XML representation and writes this encoding to the given OutputStream with no indentation.


encode

public void encode(java.io.OutputStream output,
                   Indenter indenter)
Encodes this TargetMatch into its XML representation and writes this encoding to the given OutputStream with indentation.