|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ecf.core.AbstractContainerAdapterFactory
org.eclipse.ecf.core.sharedobject.AbstractSharedObjectContainerAdapterFactory
public abstract class AbstractSharedObjectContainerAdapterFactory
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.
getSharedObjectAdapter(ISharedObjectContainer, Class)| Field Summary | |
|---|---|
protected static int |
ADD_ADAPTER_ERROR_CODE
|
protected static java.lang.String |
ADD_ADAPTER_ERROR_MESSAGE
|
| Constructor Summary | |
|---|---|
AbstractSharedObjectContainerAdapterFactory()
|
|
| Method Summary | |
|---|---|
protected abstract ISharedObject |
createAdapter(ISharedObjectContainer container,
java.lang.Class adapterType,
ID adapterID)
Create an adapter instance that implements ISharedObject and
adapterType. |
protected ID |
createAdapterID(ISharedObjectContainer container,
java.lang.Class adapterType)
Get the adapterID for the given adapterType |
protected java.util.Map |
createAdapterProperties(ISharedObjectContainer container,
java.lang.Class adapterType,
ID sharedObjectID,
ISharedObject sharedObjectAdapter)
Get properties to associate with new shared object adapter creation |
abstract java.lang.Class[] |
getAdapterList()
|
protected java.lang.Object |
getContainerAdapter(IContainer container,
java.lang.Class adapterType)
Method called by implementation of AbstractContainerAdapterFactory.getAdapter(Object, Class) if the
adaptableObject is an instance of IContainer. |
protected ISharedObject |
getSharedObjectAdapter(ISharedObjectContainer container,
java.lang.Class adapterType)
Get the ISharedObject adapter for given
ISharedObjectContainer. |
| Methods inherited from class org.eclipse.ecf.core.AbstractContainerAdapterFactory |
|---|
getAdapter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int ADD_ADAPTER_ERROR_CODE
protected static final java.lang.String ADD_ADAPTER_ERROR_MESSAGE
| Constructor Detail |
|---|
public AbstractSharedObjectContainerAdapterFactory()
| Method Detail |
|---|
protected java.lang.Object getContainerAdapter(IContainer container,
java.lang.Class adapterType)
AbstractContainerAdapterFactoryAbstractContainerAdapterFactory.getAdapter(Object, Class) if the
adaptableObject is an instance of IContainer. Subclasses should implement to
return the proper container adapter object based upon the given adapterType.
getContainerAdapter in class AbstractContainerAdapterFactorycontainer - 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
null.
protected ISharedObject getSharedObjectAdapter(ISharedObjectContainer container,
java.lang.Class adapterType)
ISharedObject adapter for given
ISharedObjectContainer. The resulting ISharedObject must
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)
container - the ISharedObjectContainer that will hold the new
ISharedObject adapteradapterType - the type that the ISharedObject must also implement to
be an adapter
protected java.util.Map createAdapterProperties(ISharedObjectContainer container,
java.lang.Class adapterType,
ID sharedObjectID,
ISharedObject sharedObjectAdapter)
container - the container that will contain the new adapter shared objectadapterType - the adapterType for the new shared objectsharedObjectID - the ID for the new shared object adaptersharedObjectAdapter - the new shared object adapter
protected ID createAdapterID(ISharedObjectContainer container,
java.lang.Class adapterType)
container - the container the adapter will be added toadapterType - the type of the adapter
getSharedObjectAdapter(ISharedObjectContainer, Class)
will also return null
protected abstract ISharedObject createAdapter(ISharedObjectContainer container,
java.lang.Class adapterType,
ID adapterID)
ISharedObject and
adapterType. The resulting instance must implement both
ISharedObject and adapterType
container - the container that will contain the new adapter instanceadapterType - the adapter type. The returned value must implement this
interfaceadapterID - the ID to use for the new adapter
getSharedObjectAdapter(ISharedObjectContainer, Class)
will also return nullpublic abstract java.lang.Class[] getAdapterList()
getAdapterList in interface org.eclipse.core.runtime.IAdapterFactorygetAdapterList in class AbstractContainerAdapterFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||