|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.portal.resolver.helper.CORLookup
public class CORLookup
Convenience class that facilitates the lookup for services that are associates with URIs via the content operations registry
Constructor Summary | |
---|---|
CORLookup()
|
Method Summary | ||
---|---|---|
static
|
getService(java.net.URI uri,
java.lang.Class<T> cls,
ServiceHandler handler,
Context ctx,
T defaultService)
Returns a service from a service handler |
|
static
|
getServices(java.util.Collection<? super T> dst,
java.lang.Class<T> cls,
Context ctx)
Convenience method to assemble all services for a particular interface |
|
static
|
getServices(java.util.Collection<? super T> dst,
java.net.URI uri,
java.lang.Class<T> cls,
Context ctx,
T defaultService)
Assembles all services that implement a particular interface |
|
static
|
lookupService(java.net.URI uri,
java.lang.Class<T> cls,
Context ctx)
|
|
static
|
lookupService(java.net.URI uri,
java.lang.Class<T> cls,
Context ctx,
T defaultService)
Uses the COR to find a service that exposes a particular interface. |
|
static
|
serviceHandlerExists(java.net.URI uri,
java.lang.Class<T> cls,
Context ctx)
Checks if a service handler for the given service is registered, without throwing an exception |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CORLookup()
Method Detail |
---|
public static <T> T getService(java.net.URI uri, java.lang.Class<T> cls, ServiceHandler handler, Context ctx, T defaultService) throws org.eclipse.core.runtime.CoreException, ServiceNotFoundException
uri
- the URI, may be null
cls
- the class that the service should implement, not
null
handler
- the handler, may be null
ctx
- the COR contextdefaultService
- an optional default service, may be null
null
org.eclipse.core.runtime.CoreException
ServiceNotFoundException
public static <T> java.util.Collection<? super T> getServices(java.util.Collection<? super T> dst, java.lang.Class<T> cls, Context ctx) throws ServiceNotFoundException, org.eclipse.core.runtime.CoreException
dst
- the target collectioncls
- the class object of the servicectx
- the COR context
ServiceNotFoundException
org.eclipse.core.runtime.CoreException
public static <T> java.util.Collection<? super T> getServices(java.util.Collection<? super T> dst, java.net.URI uri, java.lang.Class<T> cls, Context ctx, T defaultService) throws ServiceNotFoundException, org.eclipse.core.runtime.CoreException
dst
- target collection that will contain the resulturi
- the URI, may be null
cls
- the interface classctx
- the COR contextdefaultService
- default service
ServiceNotFoundException
org.eclipse.core.runtime.CoreException
public static <T> T lookupService(java.net.URI uri, java.lang.Class<T> cls, Context ctx) throws org.eclipse.core.runtime.CoreException, ServiceNotFoundException
uri
- cls
- ctx
-
org.eclipse.core.runtime.CoreException
ServiceNotFoundException
public static <T> T lookupService(java.net.URI uri, java.lang.Class<T> cls, Context ctx, T defaultService) throws org.eclipse.core.runtime.CoreException, ServiceNotFoundException
uri
- cls
- ctx
-
org.eclipse.core.runtime.CoreException
- - some COR stuff failed
ServiceNotFoundException
- - the service could not be locatedpublic static <T> boolean serviceHandlerExists(java.net.URI uri, java.lang.Class<T> cls, Context ctx)
uri
- the URI of the service, not null
cls
- the classname of the service handler, not null
ctx
- the COR context, not null
true
if the handler exists, else false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |