|
|||||||||
Home >> All >> com >> sun >> xacml >> [ finder overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
com.sun.xacml.finder
Class PolicyFinderModule

java.lang.Objectcom.sun.xacml.finder.PolicyFinderModule
- public abstract class PolicyFinderModule
- extends java.lang.Object
This is the abstract class that all PolicyFinder
modules
extend. All methods have default values to represent that the given
feature isn't supported by this module, so module writers needs only
implement the methods for the features they're supporting.
- Since:
- 1.0
Constructor Summary | |
PolicyFinderModule()
|
Method Summary | |
PolicyFinderResult |
findPolicy(com.sun.xacml.EvaluationCtx context)
Tries to find one and only one matching policy given the request represented by the context data. |
PolicyFinderResult |
findPolicy(java.net.URI idReference,
int type)
Tries to find one and only one matching policy given the idReference If more than one policy is found, this is an error and must be reported as such. |
java.lang.String |
getIdentifier()
Returns this module's identifier. |
abstract void |
init(PolicyFinder finder)
Initializes this module for use by the given finder. |
void |
invalidateCache()
This is an experimental method that asks the module to invalidate any cache values it may contain. |
boolean |
isIdReferenceSupported()
Returns true if the module supports finding policies based on an id reference (in a PolicySet). |
boolean |
isRequestSupported()
Returns true if the module supports finding policies based on a request (ie, target matching). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
PolicyFinderModule
public PolicyFinderModule()
Method Detail |
getIdentifier
public java.lang.String getIdentifier()
- Returns this module's identifier. A module does not need to provide
a unique identifier, but it is a good idea, especially in support of
management software. Common identifiers would be the full package
and class name (the default if this method isn't overridden), just the
class name, or some other well-known string that identifies this class.
isRequestSupported
public boolean isRequestSupported()
- Returns true if the module supports finding policies based on a
request (ie, target matching). By default this method returns false.
isIdReferenceSupported
public boolean isIdReferenceSupported()
- Returns true if the module supports finding policies based on an
id reference (in a PolicySet). By default this method returns false.
init
public abstract void init(PolicyFinder finder)
- Initializes this module for use by the given finder. Typically this
is called when a
PDP
is initialized with aPDPConfig
containing the givenPolicyFinder
. BecausePolicyFinderModule
s usually need to parse policies, and this requires knowing theirPolicyFinder
, parsing is usually done at or after this point in the lifetime of this module. This might also be a good time to reset any internal caches or temporary data. Note that this method may be called more than once in the lifetime of a module.
invalidateCache
public void invalidateCache()
- This is an experimental method that asks the module to invalidate any
cache values it may contain. This is not used by any of the core
processing code, but it may be used by management software that wants
to have some control over these modules. Since a module is free to
decide how or if it caches values, and whether it is capable of
updating values once in a cache, a module is free to intrepret this
message in any way it sees fit (including igoring the message). It
is preferable, however, for a module to make every effort to clear
any dynamically cached values it contains.
This method has been introduced to see what people think of this functionality, and how they would like to use it. It may be removed in future versions, or it may be changed to a more general message-passing system (if other useful messages are identified).
- Since:
- 1.2
findPolicy
public PolicyFinderResult findPolicy(com.sun.xacml.EvaluationCtx context)
- Tries to find one and only one matching policy given the request
represented by the context data. If more than one policy is found,
this is an error and must be reported as such. If no policies are
found, then an empty result must be returned. By default this
method returns an empty result. This method should never return null.
findPolicy
public PolicyFinderResult findPolicy(java.net.URI idReference, int type)
- Tries to find one and only one matching policy given the idReference
If more than one policy is found, this is an error and must be reported
as such. If no policies are found, then an empty result must be
returned. By default this method returns an empty result. This method
should never return null.
|
|||||||||
Home >> All >> com >> sun >> xacml >> [ finder overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |