com.sdm.quasar.client.core.dialogsupport.features
Class AbstractDialogCoreFeature

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.AbstractFeature
      extended bycom.sdm.quasar.client.core.dialogsupport.features.AbstractDialogCoreFeature
All Implemented Interfaces:
Feature, SystemInfoProvider
Direct Known Subclasses:
EmplDetailDialog, ListDialog

public abstract class AbstractDialogCoreFeature
extends AbstractFeature

Abstract Feature that supports convenience methods and a typical initialization for a dialog core

Author:
Martin Haft

Constructor Summary
AbstractDialogCoreFeature()
           
 
Method Summary
protected  void dispose()
          Called when the feature or dialog is disposed.
protected  CommandManagerFeature getCommandManagerFeature()
          Returns the Feature instance.
protected  DataManager getDataManager()
          Convenience methof for access to the DataManager
protected  DataManagerFeature getDataManagerFeature()
          Returns the data manager feature instance where our data is stored.
protected  java.lang.Object getValue(java.lang.String key)
          Convenience method to to get a value from the data manager
protected  void init()
          Called when the feature is initializing.
protected abstract  void initCommandManager()
          Initializes the CommandManager.
protected abstract  void initDataManager()
          Initializes the DataManager.
protected abstract  void initStates()
          Initializes the States.
protected  void setValue(java.lang.String key, Context context, java.lang.Object value)
          Convenience method to set or change data in the data manager
protected  void setValue(java.lang.String key, java.lang.Object value)
          Convenience method to set or change data in the data manager
 
Methods inherited from class com.sdm.quasar.client.core.dialog.AbstractFeature
activate, attachDialogControl, collectSystemInfo, deactivate, disposeFeature, getDialogControl, isInitialized, prepare, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDialogCoreFeature

public AbstractDialogCoreFeature()
Method Detail

dispose

protected void dispose()
                throws DisposeException
Description copied from class: AbstractFeature
Called when the feature or dialog is disposed. Override this method to clean up resources and free memory when disposing.

Specified by:
dispose in class AbstractFeature
Throws:
DisposeException

init

protected void init()
Description copied from class: AbstractFeature
Called when the feature is initializing. This is normally done, when the feature is connected to the lifecycle of the DialogControl installed to. To access the DialogControl use the AbstractFeature.getDialogControl() method.

Override this method to perform some action on initialization e.g. register public services.

Specified by:
init in class AbstractFeature

initDataManager

protected abstract void initDataManager()
Initializes the DataManager. This method is called first in the init() method


initStates

protected abstract void initStates()
Initializes the States. This method is called second in init() after initializing the DataManager (see initDataManager()).


initCommandManager

protected abstract void initCommandManager()
Initializes the CommandManager. This method is called last in the init() method after initDataManager() and initStates().


getDataManagerFeature

protected DataManagerFeature getDataManagerFeature()
Returns the data manager feature instance where our data is stored. See FeatureManager.requireFeature(Class) for more information about the process.


getDataManager

protected DataManager getDataManager()
Convenience methof for access to the DataManager

Returns:
the data manager for this dialog

getValue

protected java.lang.Object getValue(java.lang.String key)
Convenience method to to get a value from the data manager

Parameters:
key - the key to the value in the data manager
Returns:
the value from the data manager

setValue

protected void setValue(java.lang.String key,
                        java.lang.Object value)
Convenience method to set or change data in the data manager

Parameters:
key - the key to the value in the data manager

setValue

protected void setValue(java.lang.String key,
                        Context context,
                        java.lang.Object value)
Convenience method to set or change data in the data manager

Parameters:
key - the key to the value in the data manager

getCommandManagerFeature

protected CommandManagerFeature getCommandManagerFeature()
Returns the Feature instance. If the feature is already installed, the installed instance will be returned, if it is not installed, a new instance will be created; if the installation of the new feature fails, an runtime exception will be thrown.