java.lang.Object
com.sun.xacml.finder.PolicyFinder
- public class PolicyFinder
- extends java.lang.Object
This class is used by the PDP to find all policies used in evaluation. A
PDP is given a pre-configured PolicyFinder
on construction.
The PolicyFinder
provides the functionality both to find
policies based on a request (ie, retrieve policies and match against the
target) and based on an idReference (as can be included in a PolicySet).
While this class is typically used by the PDP, it is intentionally
designed to support stand-alone use, so it could be the base for a
distributed service, or for some application that needs just this
functionality. There is nothing in the PolicyFinder
Note that it is an error to have more than one top-level policy (as
explained in the OnlyOneApplicable combining algorithm), so any module
that is added to this finder will be evaluated each time a policy is
requested. This means that you should think carefully about how many
modules you include, and how they can cache policy data.
- Since:
- 1.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
allModules
private java.util.Set allModules
requestModules
private java.util.Set requestModules
referenceModules
private java.util.Set referenceModules
logger
private static final java.util.logging.Logger logger
PolicyFinder
public PolicyFinder()
getModules
public java.util.Set getModules()
- Returns the unordered
Set
of modules used by this class
to find policies.
setModules
public void setModules(java.util.Set modules)
- Sets the unordered
Set
of modules used by this class
to find policies.
init
public void init()
findPolicy
public PolicyFinderResult findPolicy(com.sun.xacml.EvaluationCtx context)
- Finds a policy based on a request's context. This may involve using
the request data as indexing data to lookup a policy. This will always
do a Target match to make sure that the given policy applies. If more
than one applicable policy is found, this will return an error.
findPolicy
public PolicyFinderResult findPolicy(java.net.URI idReference,
int type)
throws java.lang.IllegalArgumentException
- Finds a policy based on an id reference. This may involve using
the reference as indexing data to lookup a policy. This will always
do a Target match to make sure that the given policy applies. If more
than one applicable policy is found, this will return an error.