|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.security.xacml.sunxacml.finder.PolicyFinderModule
org.jboss.security.xacml.sunxacml.support.finder.BasicPolicyFinderModule
public class BasicPolicyFinderModule
This is a basic implementation of PolicyFinderModule that
accepts already created AbstractPolicys and supports
finding by context and reference. All policies are held forever once
added to this module, and cannot be refreshed or removed. New policies
may be added at any point. You may optionally specify a combining
algorithm to use when more than one applicable policy is found, and then
a new PolicySet is wrapped around the policies using this algorithm. If
no combining algorithm is provided, then an error is returned if more
than one policy matches.
This module is provided as an example, but is still fully functional, and
should be useful for many simple applications. This is provided in the
support package rather than the core codebase because it
implements non-standard behavior.
| Constructor Summary | |
|---|---|
BasicPolicyFinderModule()
Creates a BasicPolicyFinderModule. |
|
BasicPolicyFinderModule(PolicyCombiningAlgorithm combiningAlg)
Creates a BasicPolicyFinderModule that can combine
multiple applicable policies under a single, dynamic PolicySet. |
|
| Method Summary | |
|---|---|
boolean |
addPolicy(AbstractPolicy policy)
Adds a policy that will be available both by reference and by matching to a context. |
boolean |
addPolicyNoRef(AbstractPolicy policy)
Adds a policy that will be available only by matching to a context. |
boolean |
addPolicyOnlyRef(AbstractPolicy policy)
Adds a policy that will be available only by reference. |
PolicyFinderResult |
findPolicy(EvaluationCtx context)
Finds a policy based on a request's context. |
PolicyFinderResult |
findPolicy(URI idReference,
int type,
VersionConstraints constraints,
PolicyMetaData parentMetaData)
Attempts to find a policy by reference, based on the provided parameters. |
void |
init(PolicyFinder finder)
Initialize this module. |
boolean |
isIdReferenceSupported()
Always returns true since this module does support
finding policies based on reference. |
boolean |
isRequestSupported()
Always returns true since this module does support
finding policies based on context matching. |
| Methods inherited from class org.jboss.security.xacml.sunxacml.finder.PolicyFinderModule |
|---|
getIdentifier, invalidateCache |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicPolicyFinderModule()
BasicPolicyFinderModule.
public BasicPolicyFinderModule(PolicyCombiningAlgorithm combiningAlg)
BasicPolicyFinderModule that can combine
multiple applicable policies under a single, dynamic PolicySet.
combiningAlg - the algorithm to use in a new PolicySet when more
than one policy applies| Method Detail |
|---|
public boolean addPolicy(AbstractPolicy policy)
policy - the policy to add
public boolean addPolicyNoRef(AbstractPolicy policy)
policy - the policy to add
public boolean addPolicyOnlyRef(AbstractPolicy policy)
policy - the policy to add
public boolean isRequestSupported()
true since this module does support
finding policies based on context matching.
isRequestSupported in class PolicyFinderModulepublic boolean isIdReferenceSupported()
true since this module does support
finding policies based on reference.
isIdReferenceSupported in class PolicyFinderModulepublic void init(PolicyFinder finder)
PolicyFinder when a PDP is created.
init in class PolicyFinderModulefinder - the PolicyFinder using this modulepublic PolicyFinderResult findPolicy(EvaluationCtx context)
findPolicy in class PolicyFinderModulecontext - the representation of the request data
public PolicyFinderResult findPolicy(URI idReference,
int type,
VersionConstraints constraints,
PolicyMetaData parentMetaData)
findPolicy in class PolicyFinderModuleidReference - an identifier specifying some policytype - type of reference (policy or policySet) as identified by
the fields in PolicyReferenceconstraints - any optional constraints on the version of the
referenced policy (this will never be null, but
it may impose no constraints, and in fact will
never impose constraints when used from a pre-2.0
XACML policy)parentMetaData - the meta-data from the parent policy, which
provides XACML version, factories, etc.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||