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

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.AbstractFeature
      extended bycom.sdm.quasar.client.core.dialogsupport.features.CommandManagerFeature
All Implemented Interfaces:
CommandManager, Feature, SystemInfoProvider

public class CommandManagerFeature
extends AbstractFeature
implements CommandManager

A Feature implementing CommandManager. This feature delegates calls to the CommandManager interface to an instance, that must be set using setCommandManager(CommandManager) before accessing the CommandManager interface.

Version:
1.$Revision$
Author:
Thomas Wolf

Constructor Summary
CommandManagerFeature()
           
 
Method Summary
protected  void dispose()
          Called when the feature or dialog is disposed.
 Command getCommand(java.lang.String commandId)
          Get a Command from the CommandManager
 boolean hasCommand(java.lang.String commandId)
          Checks, if the CommandManager provides a command with a given id
protected  void init()
          Called when the feature is initializing.
 void setCommandManager(CommandManager commandManager)
          Sets the CommandManager to delegate calls to to the given instance.
 
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

CommandManagerFeature

public CommandManagerFeature()
Method Detail

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
See Also:
com.sdm.quasar.client.core.dialog.features.AbstractFeature#init()

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
See Also:
AbstractFeature.dispose()

setCommandManager

public void setCommandManager(CommandManager commandManager)
Sets the CommandManager to delegate calls to to the given instance.

Parameters:
commandManager - the CommandManager to delegate to

hasCommand

public boolean hasCommand(java.lang.String commandId)
Description copied from interface: CommandManager
Checks, if the CommandManager provides a command with a given id

Specified by:
hasCommand in interface CommandManager
Parameters:
commandId - the id of a command
Returns:
true, if the CommandManager provides a command with given id
See Also:
CommandManager.hasCommand(java.lang.String)

getCommand

public Command getCommand(java.lang.String commandId)
Description copied from interface: CommandManager
Get a Command from the CommandManager

Specified by:
getCommand in interface CommandManager
Parameters:
commandId - the id of a command
Returns:
the command with the given id,
See Also:
CommandManager.getCommand(java.lang.String)