Rational Developer for Power Systems Software
V7.6

com.ibm.etools.systems.app.model.provider
Class ModelItemProviderAdapterFactory

java.lang.Object
  extended by AdapterFactoryImpl
      extended by com.ibm.etools.systems.app.model.util.ModelAdapterFactory
          extended by com.ibm.etools.systems.app.model.provider.ModelItemProviderAdapterFactory

public class ModelItemProviderAdapterFactory
extends ModelAdapterFactory

This is the factory that is used to provide the interfaces needed to support Viewers. The adapters generated by this factory convert EMF adapter notifications into calls to fireNotifyChanged. The adapters also support Eclipse property sheets. Note that most of the adapters are shared among multiple instances.


Field Summary
protected  ApplicationModelItemProvider applicationModelItemProvider
          This keeps track of the one adapter used for all ApplicationModel instances.
protected  ArtifactItemProvider artifactItemProvider
          This keeps track of the one adapter used for all Artifact instances.
protected  IChangeNotifier changeNotifier
          This is used to implement org.eclipse.emf.edit.provider.IChangeNotifier.
static String copyright
           
protected  ComposedAdapterFactory parentAdapterFactory
          This keeps track of the root adapter factory that delegates to this adapter factory.
protected  RelationshipItemProvider relationshipItemProvider
          This keeps track of the one adapter used for all Relationship instances.
protected  Collection supportedTypes
          This keeps track of all the supported types checked by isFactoryForType.
 
Fields inherited from class com.ibm.etools.systems.app.model.util.ModelAdapterFactory
modelPackage, modelSwitch
 
Constructor Summary
ModelItemProviderAdapterFactory()
          This constructs an instance.
 
Method Summary
 Adapter adapt(Notifier notifier, Object type)
          This implementation substitutes the factory itself as the key for the adapter.
 void addListener(INotifyChangedListener notifyChangedListener)
          This adds a listener.
 Adapter createApplicationModelAdapter()
          This creates an adapter for a ApplicationModel.
 Adapter createArtifactAdapter()
          This creates an adapter for a Artifact.
 Adapter createRelationshipAdapter()
          This creates an adapter for a Relationship.
 void dispose()
          This disposes all of the item providers created by this factory.
 void fireNotifyChanged(Notification notification)
          This delegates to changeNotifier and to parentAdapterFactory.
 ComposeableAdapterFactory getRootAdapterFactory()
          This returns the root adapter factory that contains this factory.
 boolean isFactoryForType(Object type)
           
 void removeListener(INotifyChangedListener notifyChangedListener)
          This removes a listener.
 void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
          This sets the composed adapter factory that contains this factory.
 
Methods inherited from class com.ibm.etools.systems.app.model.util.ModelAdapterFactory
createAdapter, createEObjectAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright

See Also:
Constant Field Values

parentAdapterFactory

protected ComposedAdapterFactory parentAdapterFactory
This keeps track of the root adapter factory that delegates to this adapter factory.


changeNotifier

protected IChangeNotifier changeNotifier
This is used to implement org.eclipse.emf.edit.provider.IChangeNotifier.


supportedTypes

protected Collection supportedTypes
This keeps track of all the supported types checked by isFactoryForType.


relationshipItemProvider

protected RelationshipItemProvider relationshipItemProvider
This keeps track of the one adapter used for all Relationship instances.


artifactItemProvider

protected ArtifactItemProvider artifactItemProvider
This keeps track of the one adapter used for all Artifact instances.


applicationModelItemProvider

protected ApplicationModelItemProvider applicationModelItemProvider
This keeps track of the one adapter used for all ApplicationModel instances.

Constructor Detail

ModelItemProviderAdapterFactory

public ModelItemProviderAdapterFactory()
This constructs an instance.

Method Detail

createRelationshipAdapter

public Adapter createRelationshipAdapter()
This creates an adapter for a Relationship.

Overrides:
createRelationshipAdapter in class ModelAdapterFactory
Returns:
the new adapter.
See Also:
Relationship

createArtifactAdapter

public Adapter createArtifactAdapter()
This creates an adapter for a Artifact.

Overrides:
createArtifactAdapter in class ModelAdapterFactory
Returns:
the new adapter.
See Also:
Artifact

createApplicationModelAdapter

public Adapter createApplicationModelAdapter()
This creates an adapter for a ApplicationModel.

Overrides:
createApplicationModelAdapter in class ModelAdapterFactory
Returns:
the new adapter.
See Also:
ApplicationModel

getRootAdapterFactory

public ComposeableAdapterFactory getRootAdapterFactory()
This returns the root adapter factory that contains this factory.


setParentAdapterFactory

public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
This sets the composed adapter factory that contains this factory.


isFactoryForType

public boolean isFactoryForType(Object type)

Overrides:
isFactoryForType in class ModelAdapterFactory
Returns:
whether this factory is applicable for the type of the object.

adapt

public Adapter adapt(Notifier notifier,
                     Object type)
This implementation substitutes the factory itself as the key for the adapter.


addListener

public void addListener(INotifyChangedListener notifyChangedListener)
This adds a listener.


removeListener

public void removeListener(INotifyChangedListener notifyChangedListener)
This removes a listener.


fireNotifyChanged

public void fireNotifyChanged(Notification notification)
This delegates to changeNotifier and to parentAdapterFactory.


dispose

public void dispose()
This disposes all of the item providers created by this factory.


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.