com.ibm.portal.resolver.helper
Class CORResolutionService
java.lang.Object
com.ibm.portal.resolver.helper.CORResolutionService
- All Implemented Interfaces:
- CORService, ResolutionService
-
public class CORResolutionService
- extends java.lang.Object
- implements ResolutionService, CORService
Resolution service that implements itself by dispatching to a resolution
service provided by the COR.
- Since:
- 6.0.1
Constructor Summary
|
CORResolutionService()
initialize the resolution service without default resolution service |
CORResolutionService(ResolutionService aDefaultService)
Initialize the resolution service passing a default service reference
that will be used if no COR service can be found |
Method Summary
|
protected ResolutionService |
lookupService(java.net.URI uri,
java.lang.Class<ResolutionService> cls,
Context ctx)
Uses the COR to find a service that exposes a particular interface. |
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. |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SINGLETON
public static final ResolutionService SINGLETON
- Singleton that can be used to do COR lookups that don't require a
fallback
defaultService
protected final ResolutionService defaultService
- default lookup service
CORResolutionService
public CORResolutionService()
- initialize the resolution service without default resolution service
CORResolutionService
public CORResolutionService(ResolutionService aDefaultService)
- Initialize the resolution service passing a default service reference
that will be used if no COR service can be found
- Parameters:
- aDefaultService - default resolution service, may be null
lookupService
protected ResolutionService lookupService(java.net.URI uri,
java.lang.Class<ResolutionService> cls,
Context ctx)
throws org.eclipse.core.runtime.CoreException,
ServiceNotFoundException
- Uses the COR to find a service that exposes a particular interface. The
fully specified classname of the interface is interpreted as the ID of
the service
- Parameters:
- uri - POC URI to resolve
- cls - class object for the service to locate
- ctx - COR context
- Returns:
- Implementation of the service handler for the URI and the
specified class
- Throws:
- org.eclipse.core.runtime.CoreException - - some COR stuff failed
- ServiceNotFoundException - - the service could not be located
resolve
public 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
- Description copied from interface: ResolutionService
- 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.
- Specified by:
- resolve in interface ResolutionService
- 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