Class AbstractSharedObjectContainerAdapterFactory
java.lang.Object
org.eclipse.ecf.core.AbstractContainerAdapterFactory
org.eclipse.ecf.core.sharedobject.AbstractSharedObjectContainerAdapterFactory
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdapterFactory
- Direct Known Subclasses:
RemoteServiceContainerAdapterFactory
public abstract class AbstractSharedObjectContainerAdapterFactory
extends AbstractContainerAdapterFactory
Abstract container adapter factory. This class implements the
IAdapterFactory
interface. It checks that the first parameter of the
AbstractContainerAdapterFactory.getAdapter(Object, Class)
method (adaptableObject) is an instance of
ISharedObjectContainer
. If it is, then the method
getSharedObjectAdapter(ISharedObjectContainer, Class)
is called with
the ISharedObjectContainer and Class passed in as arguments.-
Field Summary
Fields inherited from interface org.eclipse.core.runtime.IAdapterFactory
SERVICE_PROPERTY_ADAPTABLE_CLASS, SERVICE_PROPERTY_ADAPTER_NAMES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ISharedObject
createAdapter
(ISharedObjectContainer container, Class adapterType, ID adapterID) Create an adapter instance that implementsISharedObject
and adapterType.protected ID
createAdapterID
(ISharedObjectContainer container, Class adapterType) Get the adapterID for the given adapterTypeprotected Map
createAdapterProperties
(ISharedObjectContainer container, Class adapterType, ID sharedObjectID, ISharedObject sharedObjectAdapter) Get properties to associate with new shared object adapter creationabstract Class[]
protected Object
getContainerAdapter
(IContainer container, Class adapterType) Method called by implementation ofAbstractContainerAdapterFactory.getAdapter(Object, Class)
if the adaptableObject is an instance ofIContainer
.protected ISharedObject
getSharedObjectAdapter
(ISharedObjectContainer container, Class adapterType) Get theISharedObject
adapter for givenISharedObjectContainer
.Methods inherited from class org.eclipse.ecf.core.AbstractContainerAdapterFactory
getAdapter
-
Field Details
-
ADD_ADAPTER_ERROR_CODE
protected static final int ADD_ADAPTER_ERROR_CODE- See Also:
-
ADD_ADAPTER_ERROR_MESSAGE
- See Also:
-
-
Constructor Details
-
AbstractSharedObjectContainerAdapterFactory
public AbstractSharedObjectContainerAdapterFactory()
-
-
Method Details
-
getContainerAdapter
Description copied from class:AbstractContainerAdapterFactory
Method called by implementation ofAbstractContainerAdapterFactory.getAdapter(Object, Class)
if the adaptableObject is an instance ofIContainer
. Subclasses should implement to return the proper container adapter object based upon the given adapterType.- Specified by:
getContainerAdapter
in classAbstractContainerAdapterFactory
- Parameters:
container
- the IContainer adaptable object provided to the adapter. Will not benull
.adapterType
- the type (interface) of the adapter on the given container. Will not benull
- Returns:
- Object the container adapter instance. May be
null
.
-
getAdapterList
- Specified by:
getAdapterList
in interfaceorg.eclipse.core.runtime.IAdapterFactory
- Specified by:
getAdapterList
in classAbstractContainerAdapterFactory
-