|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.security.xacml.sunxacml.AbstractPolicy
public abstract class AbstractPolicy
Represents an instance of an XACML policy.
| 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,
String version,
CombiningAlgorithm combiningAlg,
String description,
Target target)
Constructor used to create a policy from concrete components. |
protected |
AbstractPolicy(URI id,
String version,
CombiningAlgorithm combiningAlg,
String description,
Target target,
String defaultVersion)
Constructor used to create a policy from concrete components. |
protected |
AbstractPolicy(URI id,
String version,
CombiningAlgorithm combiningAlg,
String description,
Target target,
String defaultVersion,
Set obligations,
List parameters)
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 |
getChildElements()
Returns the List of CombinerElements that
is provided to the combining algorithm. |
List |
getChildren()
Returns the List of children under this node in the
policy tree. |
CombiningAlgorithm |
getCombiningAlg()
Returns the combining algorithm used by this policy |
List |
getCombiningParameters()
Returns the list of input parameters for the combining algorithm. |
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 |
PolicyMetaData |
getMetaData()
Returns the meta-data associated with this policy |
Set |
getObligations()
Returns the Set of obligations for this policy, which may be empty |
Target |
getTarget()
Returns the target for this policy |
String |
getVersion()
Returns the version of 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 org.jboss.security.xacml.sunxacml.PolicyTreeElement |
|---|
encode, encode |
| Constructor Detail |
|---|
protected AbstractPolicy()
PolicyReference, which supplies
its own values for the methods in this class.
protected AbstractPolicy(URI id,
String version,
CombiningAlgorithm combiningAlg,
String description,
Target target)
id - the policy idversion - the policy version or null for the default (this is
always null for pre-2.0 policies)combiningAlg - the combining algorithm to usedescription - describes the policy or null if there is nonetarget - the policy's target
protected AbstractPolicy(URI id,
String version,
CombiningAlgorithm combiningAlg,
String description,
Target target,
String defaultVersion)
id - the policy idversion - the policy version or null for the default (this is
always null for pre-2.0 policies)combiningAlg - 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,
String version,
CombiningAlgorithm combiningAlg,
String description,
Target target,
String defaultVersion,
Set obligations,
List parameters)
id - the policy idversion - the policy version or null for the default (this is
always null for pre-2.0 policies)combiningAlg - 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 String getVersion()
"1.0".
public CombiningAlgorithm getCombiningAlg()
public List getCombiningParameters()
List of CombinerParameterspublic 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 List getChildElements()
List of CombinerElements that
is provided to the combining algorithm. This returns the same set
of children that getChildren provides along with any
associated combiner parameters.
List of CombinerElementspublic Set getObligations()
public PolicyMetaData getMetaData()
public MatchResult match(EvaluationCtx context)
match in interface PolicyTreeElementcontext - the representation of the request
protected void setChildren(List children)
List must
contain CombinerElements, which in turn will contain
Rules or AbstractPolicys, but may not
contain both types of elements.
children - a List of CombinerElements
representing 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||