|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.balana.finder.PolicyFinder
public class PolicyFinder
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.
Constructor Summary | |
---|---|
PolicyFinder()
Default constructor that creates a PDPConfig from components. |
Method Summary | |
---|---|
PolicyFinderResult |
findPolicy(EvaluationCtx context)
Finds a policy based on a request's context. |
PolicyFinderResult |
findPolicy(URI idReference,
int type,
VersionConstraints constraints,
PolicyMetaData parentMetaData)
Finds a policy based on an id reference. |
Set |
getModules()
Returns the unordered Set of PolicyFinderModule s used by this class
to find policies. |
void |
init()
Initializes all modules in this finder. |
void |
setModules(Set modules)
Sets the unordered Set of PolicyFinderModule s used by this class to
find policies. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PolicyFinder()
PDPConfig
from components.
Method Detail |
---|
public Set getModules()
Set
of PolicyFinderModule
s used by this class
to find policies.
Set
of PolicyFinderModule
spublic void setModules(Set modules)
Set
of PolicyFinderModule
s used by this class to
find policies.
modules
- a Set
of PolicyFinderModule
spublic void init()
public PolicyFinderResult findPolicy(EvaluationCtx context)
context
- the representation of the request data
public PolicyFinderResult findPolicy(URI idReference, int type, VersionConstraints constraints, PolicyMetaData parentMetaData) throws IllegalArgumentException
idReference
- the identifier used to resolve a policytype
- type of reference (policy or policySet) as identified by the fields in
PolicyReference
constraints
- any optional constraints on the version of the referenced policyparentMetaData
- the meta-data from the parent policy, which provides XACML version,
factories, etc.
IllegalArgumentException
- if type
is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |