info.magnolia.commands
Class CommandsManager

java.lang.Object
  extended by info.magnolia.cms.beans.config.ObservedManager
      extended by info.magnolia.commands.CommandsManager

public class CommandsManager
extends ObservedManager

Manages the Commands and Catalogs.

Version:
$Revision: 38207 $ ($Author: had $)
Author:
Philipp Bracher

Field Summary
static java.lang.String COMMAND_DELIM
           
protected static Content2BeanTransformer COMMAND_TRANSFORMER
           
static java.lang.String DEFAULT_CATALOG
           
 
Fields inherited from class info.magnolia.cms.beans.config.ObservedManager
log, registeredUUIDs
 
Constructor Summary
CommandsManager()
           
 
Method Summary
 org.apache.commons.chain.Command getCommand(java.lang.String commandName)
          Use a delimiter to separate the catalog and command name.
 org.apache.commons.chain.Command getCommand(java.lang.String catalogName, java.lang.String commandName)
          Get the command.
static CommandsManager getInstance()
           
protected  void onClear()
          Clear all catalogs.
protected  void onRegister(Content node)
          Register observation for command catalogs.
protected  void registerCatalog(Content node)
           
 
Methods inherited from class info.magnolia.cms.beans.config.ObservedManager
clear, register, reload, reload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CATALOG

public static final java.lang.String DEFAULT_CATALOG
See Also:
Constant Field Values

COMMAND_DELIM

public static final java.lang.String COMMAND_DELIM
See Also:
Constant Field Values

COMMAND_TRANSFORMER

protected static Content2BeanTransformer COMMAND_TRANSFORMER
Constructor Detail

CommandsManager

public CommandsManager()
Method Detail

onRegister

protected void onRegister(Content node)
Register observation for command catalogs.

Specified by:
onRegister in class ObservedManager

registerCatalog

protected void registerCatalog(Content node)

onClear

protected void onClear()
Clear all catalogs.

Specified by:
onClear in class ObservedManager

getCommand

public org.apache.commons.chain.Command getCommand(java.lang.String catalogName,
                                                   java.lang.String commandName)
Get the command.

Parameters:
catalogName - the catalog containing the command
commandName - the name of the command
Returns:
the command to execute

getCommand

public org.apache.commons.chain.Command getCommand(java.lang.String commandName)
Use a delimiter to separate the catalog and command name.

Parameters:
commandName -
Returns:
the command

getInstance

public static CommandsManager getInstance()
Returns:
Returns the instance.


Copyright © 2003-2010 Magnolia International Ltd.. All Rights Reserved.