| 
SunTM's XACML Implementation for JavaTM | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xacml.TargetMatch
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.
| Field Summary | |
static int | 
ACTION
An integer value indicating that this class represents an ActionMatch  | 
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  | 
| Constructor Summary | |
TargetMatch(int type,
            Function function,
            Evaluatable eval,
            AttributeValue attrValue)
Constructor that creates a TargetMatch from components. | 
|
| Method Summary | |
 void | 
encode(OutputStream output)
Encodes this TargetMatch into its XML representation and
 writes this encoding to the given OutputStream with no
 indentation. | 
 void | 
encode(OutputStream output,
       Indenter indenter)
Encodes this TargetMatch into its XML representation and
 writes this encoding to the given OutputStream with
 indentation. | 
static TargetMatch | 
getInstance(Node root,
            String prefix,
            String xpathVersion)
Creates a TargetMatch by parsing a node, using the
 input prefix to determine whether this is a SubjectMatch, ResourceMatch,
 or ActionMatch. | 
 Evaluatable | 
getMatchEvaluatable()
Returns the AttributeDesignator or
 AttributeSelector used by the matching function. | 
 Function | 
getMatchFunction()
Returns the Function used to do the matching. | 
 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 | 
public static final int SUBJECT
public static final int RESOURCE
public static final int ACTION
| Constructor Detail | 
public TargetMatch(int type,
                   Function function,
                   Evaluatable eval,
                   AttributeValue attrValue)
            throws IllegalArgumentException
TargetMatch from components.
type - an integer indicating whether this class represents a
             SubjectMatch, ResourceMatch, or ActionMatchfunction - the Function that represents the MatchIdeval - the AttributeDesignator or 
             AttributeSelector to be used to select 
             attributes from the request contextattrValue - the AttributeValue to compare against
IllegalArgumentException - if the input type isn't a valid value| Method Detail | 
public static TargetMatch getInstance(Node root,
                                      String prefix,
                                      String xpathVersion)
                               throws ParsingException,
                                      IllegalArgumentException
TargetMatch by parsing a node, using the
 input prefix to determine whether this is a SubjectMatch, ResourceMatch,
 or ActionMatch.
root - the node to parse for the TargetMatchprefix - a String indicating what type of TargetMatch
               to instantiate (Subject, Resource, or Action)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)
TargetMatch constructed by parsing
ParsingException - if there was an error during parsing
IllegalArgumentException - if the input prefix isn't a valid valuepublic int getType()
TargetMatch, either
 SUBJECT, RESOURCE, or ACTION.
public Function getMatchFunction()
Function used to do the matching.
public AttributeValue getMatchValue()
AttributeValue used by the matching function.
AttributeValue for the matchpublic Evaluatable getMatchEvaluatable()
AttributeDesignator or
 AttributeSelector used by the matching function.
public MatchResult match(EvaluationCtx context)
TargetMatch matches
 the input request (whether it is applicable)
context - the representation of the request
public void encode(OutputStream output)
TargetMatch 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)
TargetMatch 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.