com.sun.ebxml.registry.security.authorization
Class RegistryPolicyFinderModule

java.lang.Object
  extended bycom.sun.xacml.finder.PolicyFinderModule
      extended bycom.sun.ebxml.registry.security.authorization.RegistryPolicyFinderModule

public class RegistryPolicyFinderModule
extends com.sun.xacml.finder.PolicyFinderModule

This module represents a collection of files containing polices, each of which will be searched through when trying to find a policy that is applicable to a specific request.


Field Summary
static java.lang.String ASSOCIATION_TYPE_ACCESS_CONTROL_POLICY_FOR
           
 
Constructor Summary
RegistryPolicyFinderModule()
           
 
Method Summary
 com.sun.xacml.finder.PolicyFinderResult findPolicy(com.sun.xacml.EvaluationCtx context)
          Finds a policy based on a request's context.
 com.sun.xacml.finder.PolicyFinderResult findPolicy(java.net.URI idReference, int type)
          Tries to find one and only one matching policy given the idReference First it tries to find a RegistryObject with specified URI as id.
 com.sun.xacml.PolicyTreeElement getDescendantPolicyTreeElement(com.sun.xacml.PolicyTreeElement parent, java.net.URI descendantId)
          Get the descendent AbstractPolciy composed within specified PolicyTreeElement object that matches the specified id.
 java.util.Collection getDescendantPolicyTreeElements(com.sun.xacml.PolicyTreeElement parent)
          Gets teh Collection of all POlicyElements that are Descendants of specified PolicyTreeElement
 void init(com.sun.xacml.finder.PolicyFinder finder)
           
 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 com.sun.xacml.finder.PolicyFinderModule
getIdentifier, invalidateCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASSOCIATION_TYPE_ACCESS_CONTROL_POLICY_FOR

public static final java.lang.String ASSOCIATION_TYPE_ACCESS_CONTROL_POLICY_FOR
See Also:
Constant Field Values
Constructor Detail

RegistryPolicyFinderModule

public RegistryPolicyFinderModule()
Method Detail

getDescendantPolicyTreeElements

public java.util.Collection getDescendantPolicyTreeElements(com.sun.xacml.PolicyTreeElement parent)
Gets teh Collection of all POlicyElements that are Descendants of specified PolicyTreeElement


getDescendantPolicyTreeElement

public com.sun.xacml.PolicyTreeElement getDescendantPolicyTreeElement(com.sun.xacml.PolicyTreeElement parent,
                                                                      java.net.URI descendantId)
Get the descendent AbstractPolciy composed within specified PolicyTreeElement object that matches the specified id.


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.

Returns:
true if request retrieval is supported

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.

Returns:
true if idReference retrieval is supported

init

public void init(com.sun.xacml.finder.PolicyFinder finder)

findPolicy

public com.sun.xacml.finder.PolicyFinderResult findPolicy(com.sun.xacml.EvaluationCtx context)
Finds a policy based on a request's context. Returns the custom Policy associated with resource if any, otherwise return the registry's default Policy. This will always do a Target match to make sure that the given policy applies.

Parameters:
context - the representation of the request data
Returns:
the result of trying to find an applicable policy

findPolicy

public com.sun.xacml.finder.PolicyFinderResult findPolicy(java.net.URI idReference,
                                                          int type)
Tries to find one and only one matching policy given the idReference First it tries to find a RegistryObject with specified URI as id. If none is found, it tries to find an ACP with specified URI as a value for a Slot named "ComposedPolicies".

Parameters:
idReference - an identifier specifying some policy
type - type of reference (policy or policySet) as identified by the fields in PolicyReference
Returns:
the result of looking for a matching policy