org.ocd.cmdmgr
Class CmdManager

java.lang.Object
  |
  +--org.ocd.cmdmgr.CmdManager
All Implemented Interfaces:
ICmdManager

public class CmdManager
extends java.lang.Object
implements ICmdManager

Since:
$Date: 2002/08/09 02:41:37 $
Version:
$Revision: 1.3 $
Author:
$Author: drichan $, ocd_dino - ocd_dino@users.sourceforge.net (initial author)

Method Summary
 void addCmdFactory(ICmdFactory pFactory)
          Add a Cmd Factory
 ICmdAction getCmdAction(java.lang.Object pCmd)
          Get an Action for the Command.
 ICmdAction[] getCmdActions(java.lang.Object pCmd)
          Get an array of Actions for the Command.
 ICmdFactory getCmdFactory(java.lang.String pName)
          Get the Cmd Factory of the specified name
static ICmdManager getDefaultManager()
          Get The Default CmdManager
 java.util.List getFactories()
          Get a List of all Cmd Factories
 void removeCmdFactory(ICmdFactory pFactory)
          Remove a Cmd Factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCmdAction

public ICmdAction getCmdAction(java.lang.Object pCmd)
Get an Action for the Command. The first CmdFactory that supports this Cmd Objectwill ask each CmdFactory to will create an Action for the Command Object
Specified by:
getCmdAction in interface ICmdManager
Parameters:
pCmd - Object the Action should be based on
Returns:
ICmdAction from the First Factory that supports the specified cmd

getCmdActions

public ICmdAction[] getCmdActions(java.lang.Object pCmd)
Get an array of Actions for the Command. This will ask each CmdFactory to create an Action for the Command Object
Specified by:
getCmdActions in interface ICmdManager
Parameters:
pCmd - Object the Action should be based on
Returns:
array of ICmdAction from each factory that supports the command

getCmdFactory

public ICmdFactory getCmdFactory(java.lang.String pName)
Get the Cmd Factory of the specified name
Specified by:
getCmdFactory in interface ICmdManager
Parameters:
pName - of the Cmd Factory
Returns:
ICmdFactory with the specified name

addCmdFactory

public void addCmdFactory(ICmdFactory pFactory)
Add a Cmd Factory
Specified by:
addCmdFactory in interface ICmdManager
Parameters:
pFactory - to Add

removeCmdFactory

public void removeCmdFactory(ICmdFactory pFactory)
Remove a Cmd Factory
Specified by:
removeCmdFactory in interface ICmdManager
Parameters:
pFactory - to Remove

getFactories

public java.util.List getFactories()
Get a List of all Cmd Factories
Specified by:
getFactories in interface ICmdManager
Returns:
List

getDefaultManager

public static ICmdManager getDefaultManager()
Get The Default CmdManager
Returns:
default ICmdManager Instance