com.ibm.portal.resolver
Interface ResolutionService

All Known Implementing Classes:
CORResolutionService

public interface ResolutionService

Service that allows to resolve a URI to navigational state in the context of WebSphere Portal. In particular this service can be used to address pages and/or portlets to display a view to a URI.

Implementations for the ResolutionService need to register their services as locationServiceHandler with a serviceHandler ID of com.ibm.portal.resolver.ResolutionService. It is undefined how many instances of the resolution service implementation will be generated by the framework. Implementations must in particular be prepared that the same instance is accessed concurrently by multiple threads.

Many implementations of ResolutionService will not implement the complete resolution but will rather dispatch to different resolvers to do parts of the execution. It is intended that these subordinate resolvers be discovered dynamically by identifying them via a URI and by discovering them using the content operations registry. The CORResolutionService helper class can be used for this dynamic discovery process.

Example fragment of a plugin.xml that declares a ResolutionService.

    <extension
                point="com.ibm.content.operations.registry.locationServiceHandler">
                        
                <serviceHandler
                        class="MyServiceProvicerClassName"
                        locationTypeId="MyContentLocationId"
                        id="com.ibm.portal.resolver.ResolutionService"/>
        </extension>
 

Implementations of ResolutionService must be threadsafe, there will only be one instance per location type that is accessed by multiple threads in parallel.

Since:
6.0.1
See Also:
CORResolutionService.SINGLETON, PocServiceHome.getResolutionService()
Note:
This interface is designed to be implemented by clients.

Field Summary
static java.lang.String ATTR_CLASS
          name of the class attribute used for instantiation
static java.lang.String DEFAULT_EXTENSION_ID
          ID of the default resolution service extension.
static java.lang.String EXTENSION_POINT_ID
          ID of the resolution service extension point
 
Method Summary
 boolean resolve(Resolved res, java.net.URI uri, java.lang.String verb, java.util.Map<java.lang.String,java.lang.String[]> params, java.util.Set<Binding> acceptedBindings, Context ctx)
          Performs the resolution of the URI into navigational state by modifying the content of the resolved bean.
 

Field Detail

ATTR_CLASS

static final java.lang.String ATTR_CLASS
name of the class attribute used for instantiation

See Also:
Constant Field Values

DEFAULT_EXTENSION_ID

static final java.lang.String DEFAULT_EXTENSION_ID
ID of the default resolution service extension. This default extension will be called if there is no ResolutionService registered with a particular protocol

See Also:
Constant Field Values

EXTENSION_POINT_ID

static final java.lang.String EXTENSION_POINT_ID
ID of the resolution service extension point

See Also:
Constant Field Values
Method Detail

resolve

boolean resolve(Resolved res,
                java.net.URI uri,
                java.lang.String verb,
                java.util.Map<java.lang.String,java.lang.String[]> params,
                java.util.Set<Binding> acceptedBindings,
                Context ctx)
                throws ResolutionException,
                       StateException
Performs the resolution of the URI into navigational state by modifying the content of the resolved bean. Implementations set the binding and modify the state holder controller that is part of the resolved bean. Implementors can choose to delegate to other service implementations of the resolution service and can pass the same Resolved object around to allow for an aggregation of navigational state modifications of such delegates.

Parameters:
res - Value object that serves as an in/out parameter and that carries the navigational state.
uri - URI to resolve, not null
verb - resolution verb, may be null
params - additional context parameters that are required to perform the resolution. The map is probably unmodifiable and should not be modified even if it happens to be modifiable. The keys are of type String, the values of type String[].
acceptedBindings - unmodifiable set of the bindings that the caller accepts as results of the resolution process. Each entry in this set is an object that implements the Binding interface.
ctx - Resolution context
Returns:
true if the resolver was able to process the URI, else false. A return value of false does not indicate an error situation. Reasons for not being able to resolve a URI could e.g. be an unsupported binding. Clients can in this case try to resolve the URI on their own or dispatch to a different ResolutionService.
Throws:
ResolutionException - - if the URI cannot be resolved
StateException - - if errors during state modifications occur