Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.portal.resolver
Interface LookupService
- All Known Implementing Classes:
- CORLookupService
public interface LookupService
Service that allows to map between the URI to a resource and an ATOM feed that describes this resource, including its entry URL. Refer to Lookup for more details of the format of this ATOM feed.
Implementations for the LookupService need to register their services as locationServiceHandler with a serviceHandler ID of com.ibm.portal.resolver.LookupService. It is undefined how many instances of the lookup service implementation will be generated by the framework. Implementations must in particular be prepared that the same instance is accessed concurrently by multiple threads.
Example fragment of a plugin.xml that declares a LookupService.
<extension point="com.ibm.content.operations.registry.locationServiceHandler"> <serviceHandler class="MyServiceProvicerClassName" locationTypeId="MyContentLocationId" id="com.ibm.portal.resolver.LookupService"/> </extension>
- Since:
- 6.1.0
- See Also:
- CORLookupService
- 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 instantiationstatic java.lang.String DEFAULT_EXTENSION_ID
ID of the default implementation of the LookupService.static java.lang.String EXTENSION_POINT_ID
ID of the LookupService extension point
Method Summary Lookup newLookup(java.net.URI uri, java.lang.String verb, java.util.Map<java.lang.String,java.lang.String[]> params, boolean bIsProtected, boolean bIsSecure, Context ctx)
Constructs an XML source that produces an ATOM entry that describes the access points for the URI.
Field Detail EXTENSION_POINT_ID
static final java.lang.String EXTENSION_POINT_ID
- ID of the LookupService extension point
- See Also:
- Constant Field Values
DEFAULT_EXTENSION_ID
static final java.lang.String DEFAULT_EXTENSION_ID
ID of the default implementation of the LookupService. This default implementation can be used to implement a lookup if no service has been registered explicitly. It will generate descriptions of the WebSphere Portal provided generic service endpoints.
It is a common usecase to first check for the existence of a lookup service that has been registered explicitly for a particular URI and in case no service is registered fall back to the default lookup service implementation. Refer to CORLookupService for this usecase and pass in the default implementation of the lookup service as the fallback.
- See Also:
- Constant Field Values
ATTR_CLASS
static final java.lang.String ATTR_CLASS
- name of the class attribute used for instantiation
- See Also:
- Constant Field Values
Method Detail newLookup
Lookup newLookup(java.net.URI uri, java.lang.String verb, java.util.Map<java.lang.String,java.lang.String[]> params, boolean bIsProtected, boolean bIsSecure, Context ctx) throws javax.xml.transform.TransformerException, java.io.IOException
- Constructs an XML source that produces an ATOM entry that describes the access points for the URI. The method may return null in case there is no customized lookup for the URI / params combination. In this case a client is free to select a default lookup. If this is not the intended behaviour, the service can either return a dummy lookup object that returns an empty source or throw an exception.
- Parameters:
- uri - POC URI
- verb - lookup verb
- params - parameter map
- bIsProtected - true, if the lookup should refer to the protected context
- bIsSecure - true, if the lookup should refer to the secure context
- ctx - COR context
- Returns:
- lookup object that can produce an ATOM feed that describes the entry point and meta information for a service that can handle the URI. Implementors may return null to indicate that the service does not handle the lookup for the specified input parameters.
- Throws:
- javax.xml.transform.TransformerException - - if the lookup cannot be created
- java.io.IOException - - if an IO error occurred when trying to do the lookup
Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD