| 
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.AbstractPolicy
Represents an instance of an XACML policy.
| Field Summary | |
static String | 
XPATH_1_0_VERSION
XPath 1.0 identifier, the only version we support right now  | 
| Constructor Summary | |
protected  | 
AbstractPolicy()
Constructor used by PolicyReference, which supplies
 its own values for the methods in this class. | 
protected  | 
AbstractPolicy(Node root,
               String policyPrefix,
               String combiningName)
Constructor used by child classes to initialize the shared data from a DOM root node.  | 
protected  | 
AbstractPolicy(URI id,
               CombiningAlgorithm combiningAlg,
               String description,
               Target target)
Constructor used to create a policy from concrete components.  | 
protected  | 
AbstractPolicy(URI id,
               CombiningAlgorithm combiningAlg,
               String description,
               Target target,
               String defaultVersion)
Constructor used to create a policy from concrete components.  | 
protected  | 
AbstractPolicy(URI id,
               CombiningAlgorithm combiningAlg,
               String description,
               Target target,
               String defaultVersion,
               Set obligations)
Constructor used to create a policy from concrete components.  | 
| Method Summary | |
protected  void | 
encodeCommonElements(OutputStream output,
                     Indenter indenter)
Routine used by Policy and PolicySet to
 encode some common elements. | 
 Result | 
evaluate(EvaluationCtx context)
Tries to evaluate the policy by calling the combining algorithm on the given policies or rules.  | 
 List | 
getChildren()
Returns the List of children under this node in the
 policy tree. | 
 CombiningAlgorithm | 
getCombiningAlg()
Returns the combining algorithm used by this policy  | 
 String | 
getDefaultVersion()
Returns the XPath version to use or null if none was specified  | 
 String | 
getDescription()
Returns the given description of this policy or null if there is no description  | 
 URI | 
getId()
Returns the id of this policy  | 
 Set | 
getObligations()
Returns the Set of obligations for this policy, which may be empty  | 
 Target | 
getTarget()
Returns the target for this policy  | 
 MatchResult | 
match(EvaluationCtx context)
Given the input context sees whether or not the request matches this policy.  | 
protected  void | 
setChildren(List children)
Sets the child policy tree elements for this node, which are passed to the combining algorithm on evaluation.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface com.sun.xacml.PolicyTreeElement | 
encode, encode | 
| Field Detail | 
public static final String XPATH_1_0_VERSION
| Constructor Detail | 
protected AbstractPolicy()
PolicyReference, which supplies
 its own values for the methods in this class.
protected AbstractPolicy(URI id,
                         CombiningAlgorithm combiningAlg,
                         String description,
                         Target target)
id - the policy idcombiningAlg - the combining algorithm to usedescription - describes the policy or null if there is nonetarget - the policy's target
protected AbstractPolicy(URI id,
                         CombiningAlgorithm combiningAlg,
                         String description,
                         Target target,
                         String defaultVersion)
id - the policy idcombiningAlg - the combining algorithm to usedescription - describes the policy or null if there is nonetarget - the policy's targetdefaultVersion - the XPath version to use for selectors
protected AbstractPolicy(URI id,
                         CombiningAlgorithm combiningAlg,
                         String description,
                         Target target,
                         String defaultVersion,
                         Set obligations)
id - the policy idcombiningAlg - the combining algorithm to usedescription - describes the policy or null if there is nonetarget - the policy's targetdefaultVersion - the XPath version to use for selectorsobligations - the policy's obligations
protected AbstractPolicy(Node root,
                         String policyPrefix,
                         String combiningName)
                  throws ParsingException
root - the DOM root of the policypolicyPrefix - either "Policy" or "PolicySet"combiningName - name of the field naming the combining alg
ParsingException - if the policy is invalid| Method Detail | 
public URI getId()
getId in interface PolicyTreeElementpublic CombiningAlgorithm getCombiningAlg()
public String getDescription()
getDescription in interface PolicyTreeElementpublic Target getTarget()
getTarget in interface PolicyTreeElementpublic String getDefaultVersion()
public List getChildren()
List of children under this node in the
 policy tree. Depending on what kind of policy this node represents
 the children will either be AbstractPolicy objects
 or Rules.
getChildren in interface PolicyTreeElementList of child nodespublic Set getObligations()
public MatchResult match(EvaluationCtx context)
match in interface PolicyTreeElementcontext - the representation of the request
protected void setChildren(List children)
List must
 contain Rules or AbstractPolicys, but may
 not contain both types of elements.
children - the child elements used by the combining algorithmpublic Result evaluate(EvaluationCtx context)
match method must always
 be called first, and must always return MATCH, before this method
 is called.
evaluate in interface PolicyTreeElementcontext - the representation of the request
protected void encodeCommonElements(OutputStream output,
                                    Indenter indenter)
Policy and PolicySet to
 encode some common elements.
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.