com.ibm.websphere.personalization.resources
Interface ResourceDomain3


public interface ResourceDomain3

The primary of the pair of supporting interfaces for the Resource interface, the ResourceDomain3 interface is intended to facilitate read and query access of the data mapped in by the resource collection.

An implementor should not depend on a method on this interface being called unless caching is disabled for the collection.

Implementors should take care in the use of the RequestContext. If the output of a finder method will vary based on something in the RequestContext, that may render the cache incorrect. Cache keys are based solely on id or query passed to these methods.

Implementations of this class are provided by code generation wizards in Rational tooling. Those tools are usually the best starting point for a custom implementation if a custom implementation is required.

See Also:
ResourceManager3, PersonalizationContext, CacheManager

Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 Resource findById(java.lang.String id, RequestContext context)
          This method returns an instance of the Resource implementation with the requested id.
 java.util.Enumeration findResourcesByProperty(java.lang.String name, java.lang.String value, RequestContext context)
          This method returns an Enumeration of instances of the Resource implementation that satisfy the single test of whether property represented by "name" parameter has the value represented by the "value" parameter.
 java.util.Enumeration findResourcesByQuery(Query query, RequestContext context)
          This method returns an Enumeration of instances of the Resource implementation, where the set of objects returned are a result of satisfying the query defined by the query framework passed as the first parameter.
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Method Detail

findById

Resource findById(java.lang.String id,
                  RequestContext context)
This method returns an instance of the Resource implementation with the requested id. The instance returned is identitifed by the "name" parameter. The resource represented by the "name" parameter should represent only one Resource instance in the data store.

This method is caused by the rules engine to look up the current user resource.

Parameters:
id - The id of the resource to get. Generally this is the unique security name returned by the WebSphere Application Server security context for the logged in user. If the resource collection uses a different format for its id, a security id translator should be used.
context - A RequestContext instance.
See Also:
AuthIDTranslator, RegularExpressionSecurityTranslator

findResourcesByProperty

java.util.Enumeration findResourcesByProperty(java.lang.String name,
                                              java.lang.String value,
                                              RequestContext context)
This method returns an Enumeration of instances of the Resource implementation that satisfy the single test of whether property represented by "name" parameter has the value represented by the "value" parameter.

Parameters:
context - A RequestContext instance.

findResourcesByQuery

java.util.Enumeration findResourcesByQuery(Query query,
                                           RequestContext context)
                                           throws QueryException
This method returns an Enumeration of instances of the Resource implementation, where the set of objects returned are a result of satisfying the query defined by the query framework passed as the first parameter.

This method is called by the rules engine to evaluate a select action.

Parameters:
query - An object oriented representation of a query suitable for translation into any number of query languages or query APIs, including in particular XPath, SQL, and LDAP filters. A implementation of ISelectQueryCallback is generally used to translate the query object into a query string.
context - A RequestContext instance.
Throws:
QueryException
See Also:
ISelectQueryCallback