Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sun.xacml.finder
Class ResourceFinder  view ResourceFinder download ResourceFinder.java

java.lang.Object
  extended bycom.sun.xacml.finder.ResourceFinder

public class ResourceFinder
extends java.lang.Object

This class is used by the PDP to handle resource scopes other than Immediate. In the case of a scope of Children or Descendants, the PDP needs a list of Resource Ids to evaluate, each of which will get its own Result. Like the PolicyFinder, this is not tied in any way to the rest of the PDP code, and could be provided as a stand-alone resource.

This class basically is a coordinator that asks each module in turn if it can handle the given identifier. Evaluation proceeds in order through the given modules, and once a module returns a non-empty response (whether or not it contains any errors or only errors), the evaluation is finished and the result is returned. One of the issues here is ordering, since a given resource may look to several modules like something that they can handle. So, you must be careful when assigning to ordering of the modules in this finder.

Note that in release 1.2 the interfaces were updated to include the evaluation context. In the next major release the interfaces without the context information will be removed, but for now both exist. This means that if this finder is called with the context, then only the methods in ResourceFinderModule supporting the context will be called (and likewise only the methods without context will be called when this finder is called without the context). In practice this means that the methods with context will always get invoked, since this is what the default PDP implementation calls.

Since:
1.0

Field Summary
private  java.util.List allModules
           
private  java.util.List childModules
           
private  java.util.List descendantModules
           
private static java.util.logging.Logger logger
           
 
Constructor Summary
ResourceFinder()
          Default constructor.
 
Method Summary
 ResourceFinderResult findChildResources(com.sun.xacml.attr.AttributeValue parentResourceId)
          Deprecated. As of version 1.2, replaced by findChildResources(AttributeValue,EvaluationCtx) 55 . This version does not provide the evaluation context to the modules, and will be removed in a future release.
 ResourceFinderResult findChildResources(com.sun.xacml.attr.AttributeValue parentResourceId, com.sun.xacml.EvaluationCtx context)
          Finds Resource Ids using the Children scope, and returns all resolved identifiers as well as any errors that occurred.
 ResourceFinderResult findDescendantResources(com.sun.xacml.attr.AttributeValue parentResourceId)
          Deprecated. As of version 1.2, replaced by findDescendantResources(AttributeValue,EvaluationCtx) 55 . This version does not provide the evaluation context to the modules, and will be removed in a future release.
 ResourceFinderResult findDescendantResources(com.sun.xacml.attr.AttributeValue parentResourceId, com.sun.xacml.EvaluationCtx context)
          Finds Resource Ids using the Descendants scope, and returns all resolved identifiers as well as any errors that occurred.
 java.util.List getModules()
          Returns the ordered List of modules used by this class to find resources.
 void setModules(java.util.List modules)
          Sets the ordered List of modules used by this class to find resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allModules

private java.util.List allModules

childModules

private java.util.List childModules

descendantModules

private java.util.List descendantModules

logger

private static final java.util.logging.Logger logger
Constructor Detail

ResourceFinder

public ResourceFinder()
Default constructor.

Method Detail

getModules

public java.util.List getModules()
Returns the ordered List of modules used by this class to find resources.


setModules

public void setModules(java.util.List modules)
Sets the ordered List of modules used by this class to find resources. The ordering will be maintained.


findChildResources

public ResourceFinderResult findChildResources(com.sun.xacml.attr.AttributeValue parentResourceId,
                                               com.sun.xacml.EvaluationCtx context)
Finds Resource Ids using the Children scope, and returns all resolved identifiers as well as any errors that occurred. If no modules can handle the given Resource Id, then an empty result is returned.


findChildResources

public ResourceFinderResult findChildResources(com.sun.xacml.attr.AttributeValue parentResourceId)
Deprecated. As of version 1.2, replaced by findChildResources(AttributeValue,EvaluationCtx) 55 . This version does not provide the evaluation context to the modules, and will be removed in a future release.

Finds Resource Ids using the Children scope, and returns all resolved identifiers as well as any errors that occurred. If no modules can handle the given Resource Id, then an empty result is returned.


findDescendantResources

public ResourceFinderResult findDescendantResources(com.sun.xacml.attr.AttributeValue parentResourceId,
                                                    com.sun.xacml.EvaluationCtx context)
Finds Resource Ids using the Descendants scope, and returns all resolved identifiers as well as any errors that occurred. If no modules can handle the given Resource Id, then an empty result is returned.


findDescendantResources

public ResourceFinderResult findDescendantResources(com.sun.xacml.attr.AttributeValue parentResourceId)
Deprecated. As of version 1.2, replaced by findDescendantResources(AttributeValue,EvaluationCtx) 55 . This version does not provide the evaluation context to the modules, and will be removed in a future release.

Finds Resource Ids using the Descendants scope, and returns all resolved identifiers as well as any errors that occurred. If no modules can handle the given Resource Id, then an empty result is returned.