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: 41137 $ ($Author: gjoseph $)
Author:
Philipp Bracher

Field Summary
static String COMMAND_DELIM
           
protected static Content2BeanTransformer COMMAND_TRANSFORMER
           
static 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(String commandName)
          Use a delimiter to separate the catalog and command name.
 org.apache.commons.chain.Command getCommand(String catalogName, 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 String DEFAULT_CATALOG
See Also:
Constant Field Values

COMMAND_DELIM

public static final 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(String catalogName,
                                                   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(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-2012 Magnolia International Ltd.. All Rights Reserved.