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 theIAdapterFactoryinterface. It checks that the first parameter of theAbstractContainerAdapterFactory.getAdapter(Object, Class)method (adaptableObject) is an instance ofISharedObjectContainer. If it is, then the methodgetSharedObjectAdapter(ISharedObjectContainer, Class)is called with the ISharedObjectContainer and Class passed in as arguments.
- 
- 
Field SummaryFields Modifier and Type Field Description protected static intADD_ADAPTER_ERROR_CODEprotected static StringADD_ADAPTER_ERROR_MESSAGE
 - 
Constructor SummaryConstructors Constructor Description AbstractSharedObjectContainerAdapterFactory()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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[]getAdapterList()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.AbstractContainerAdapterFactorygetAdapter
 
- 
 
- 
- 
- 
Field Detail- 
ADD_ADAPTER_ERROR_CODEprotected static final int ADD_ADAPTER_ERROR_CODE - See Also:
- Constant Field Values
 
 - 
ADD_ADAPTER_ERROR_MESSAGEprotected static final String ADD_ADAPTER_ERROR_MESSAGE - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getContainerAdapterprotected Object getContainerAdapter(IContainer container, Class adapterType) 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 class- AbstractContainerAdapterFactory
- Parameters:
- container- the IContainer adaptable object provided to the adapter. Will not be- null.
- adapterType- the type (interface) of the adapter on the given container. Will not be- null
- Returns:
- Object the container adapter instance.  May be null.
 
 - 
getSharedObjectAdapterprotected ISharedObject getSharedObjectAdapter(ISharedObjectContainer container, Class adapterType) Get theISharedObjectadapter for givenISharedObjectContainer. The resultingISharedObjectmust also implement the adapterType interface. Once called, this method will call the following methods in order:createAdapterID(ISharedObjectContainer, Class)createAdapter(ISharedObjectContainer, Class, ID)createAdapterProperties(ISharedObjectContainer, Class, ID, ISharedObject)- Parameters:
- container- the- ISharedObjectContainerthat will hold the new- ISharedObjectadapter
- adapterType- the type that the- ISharedObjectmust also implement to be an adapter
- Returns:
- ISharedObject adapter. Must also implement adapterType interface class
 
 - 
createAdapterPropertiesprotected Map createAdapterProperties(ISharedObjectContainer container, Class adapterType, ID sharedObjectID, ISharedObject sharedObjectAdapter) Get properties to associate with new shared object adapter creation- Parameters:
- container- the container that will contain the new adapter shared object
- adapterType- the adapterType for the new shared object
- sharedObjectID- the ID for the new shared object adapter
- sharedObjectAdapter- the new shared object adapter
- Returns:
- Map of properties to associated with new shared object adapter. If null is returned then no properties will be associated with new shared object adapter. This implementation returns null. Subclasses may override as appropriate
 
 - 
createAdapterIDprotected ID createAdapterID(ISharedObjectContainer container, Class adapterType) Get the adapterID for the given adapterType- Parameters:
- container- the container the adapter will be added to
- adapterType- the type of the adapter
- Returns:
- ID the ID to use for the adapter. If null is returned, then
         getSharedObjectAdapter(ISharedObjectContainer, Class)will also return null
 
 - 
createAdapterprotected abstract ISharedObject createAdapter(ISharedObjectContainer container, Class adapterType, ID adapterID) Create an adapter instance that implementsISharedObjectand adapterType. The resulting instance must implement bothISharedObjectand adapterType- Parameters:
- container- the container that will contain the new adapter instance
- adapterType- the adapter type. The returned value must implement this interface
- adapterID- the ID to use for the new adapter
- Returns:
- ISharedObject the new adapter. If null is returned, then
         getSharedObjectAdapter(ISharedObjectContainer, Class)will also return null
 
 - 
getAdapterListpublic abstract Class[] getAdapterList() - Specified by:
- getAdapterListin interface- org.eclipse.core.runtime.IAdapterFactory
- Specified by:
- getAdapterListin class- AbstractContainerAdapterFactory
 
 
- 
 
-