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
FieldsFields inherited from interface org.eclipse.core.runtime.IAdapterFactory
SERVICE_PROPERTY_ADAPTABLE_CLASS, SERVICE_PROPERTY_ADAPTER_NAMES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ISharedObjectcreateAdapter(ISharedObjectContainer container, Class adapterType, ID adapterID) Create an adapter instance that implementsISharedObjectand adapterType.protected IDcreateAdapterID(ISharedObjectContainer container, Class adapterType) Get the adapterID for the given adapterTypeprotected MapcreateAdapterProperties(ISharedObjectContainer container, Class adapterType, ID sharedObjectID, ISharedObject sharedObjectAdapter) Get properties to associate with new shared object adapter creationabstract Class[]protected ObjectgetContainerAdapter(IContainer container, Class adapterType) Method called by implementation ofAbstractContainerAdapterFactory.getAdapter(Object, Class)if the adaptableObject is an instance ofIContainer.protected ISharedObjectgetSharedObjectAdapter(ISharedObjectContainer container, Class adapterType) Get theISharedObjectadapter 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:AbstractContainerAdapterFactoryMethod 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:
getContainerAdapterin 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:
getAdapterListin interfaceorg.eclipse.core.runtime.IAdapterFactory- Specified by:
getAdapterListin classAbstractContainerAdapterFactory
-