SunTM's XACML Implementation for JavaTM

com.sun.xacml.finder
Class ResourceFinderModule

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

public abstract class ResourceFinderModule
extends Object

This is the abstract class that all ResourceFinder 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
ResourceFinderModule()
           
 
Method Summary
 ResourceFinderResult findChildResources(AttributeValue parentResourceId)
          Deprecated. As of version 1.2, replaced by findChildResources(AttributeValue,EvaluationCtx). This version does not provide the evaluation context, and will be removed in a future release. Also, not that this will never get called when using the default PDP.
 ResourceFinderResult findChildResources(AttributeValue parentResourceId, EvaluationCtx context)
          Tries to find the child Resource Ids associated with the parent.
 ResourceFinderResult findDescendantResources(AttributeValue parentResourceId)
          Deprecated. As of version 1.2, replaced by findDescendantResources(AttributeValue,EvaluationCtx). This version does not provide the evaluation context, and will be removed in a future release. Also, not that this will never get called when using the default PDP.
 ResourceFinderResult findDescendantResources(AttributeValue parentResourceId, EvaluationCtx context)
          Tries to find the descendant Resource Ids associated with the parent.
 String getIdentifier()
          Returns this module's identifier.
 void invalidateCache()
          This is an experimental method that asks the module to invalidate any cache values it may contain.
 boolean isChildSupported()
          Returns true if this module supports finding resources with the "Children" scope.
 boolean isDescendantSupported()
          Returns true if this module supports finding resources with the "Descendants" scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceFinderModule

public ResourceFinderModule()
Method Detail

getIdentifier

public 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.

Returns:
this module's identifier

isChildSupported

public boolean isChildSupported()
Returns true if this module supports finding resources with the "Children" scope. By default this method returns false.

Returns:
true if the module supports the Children scope

isDescendantSupported

public boolean isDescendantSupported()
Returns true if this module supports finding resources with the "Descendants" scope. By default this method returns false.

Returns:
true if the module supports the Descendants scope

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

findChildResources

public ResourceFinderResult findChildResources(AttributeValue parentResourceId,
                                               EvaluationCtx context)
Tries to find the child Resource Ids associated with the parent. If this module cannot handle the given identifier, then an empty result is returned, otherwise the result will always contain at least the parent Resource Id, either as a successfully resolved Resource Id or an error case, but never both.

Parameters:
parentResourceId - the parent resource identifier
context - the representation of the request data
Returns:
the result of finding child resources

findChildResources

public ResourceFinderResult findChildResources(AttributeValue parentResourceId)
Deprecated. As of version 1.2, replaced by findChildResources(AttributeValue,EvaluationCtx). This version does not provide the evaluation context, and will be removed in a future release. Also, not that this will never get called when using the default PDP.

Tries to find the child Resource Ids associated with the parent. If this module cannot handle the given identifier, then an empty result is returned, otherwise the result will always contain at least the parent Resource Id, either as a successfully resolved Resource Id or an error case, but never both.

Parameters:
parentResourceId - the parent resource identifier
Returns:
the result of finding child resources

findDescendantResources

public ResourceFinderResult findDescendantResources(AttributeValue parentResourceId,
                                                    EvaluationCtx context)
Tries to find the descendant Resource Ids associated with the parent. If this module cannot handle the given identifier, then an empty result is returned, otherwise the result will always contain at least the parent Resource Id, either as a successfuly resolved Resource Id or an error case, but never both.

Parameters:
parentResourceId - the parent resource identifier
context - the representation of the request data
Returns:
the result of finding descendant resources

findDescendantResources

public ResourceFinderResult findDescendantResources(AttributeValue parentResourceId)
Deprecated. As of version 1.2, replaced by findDescendantResources(AttributeValue,EvaluationCtx). This version does not provide the evaluation context, and will be removed in a future release. Also, not that this will never get called when using the default PDP.

Tries to find the descendant Resource Ids associated with the parent. If this module cannot handle the given identifier, then an empty result is returned, otherwise the result will always contain at least the parent Resource Id, either as a successfuly resolved Resource Id or an error case, but never both.

Parameters:
parentResourceId - the parent resource identifier
Returns:
the result of finding descendant resources

Sun's XACML Implementation Version 1.2

Copyright 2003-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.