|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.beans.config.ObservedManager info.magnolia.commands.CommandsManager
@Singleton public class CommandsManager
Manages the Commands and Catalogs.
Field Summary | |
---|---|
static String |
COMMAND_DELIM
|
static String |
DEFAULT_CATALOG
|
Fields inherited from class info.magnolia.cms.beans.config.ObservedManager |
---|
log, registeredUUIDs |
Constructor Summary | |
---|---|
CommandsManager(Node2BeanProcessor nodeToBean)
|
Method Summary | |
---|---|
boolean |
executeCommand(Command command,
Map<String,Object> params)
Executes the given command. |
boolean |
executeCommand(String commandName,
Map<String,Object> params)
Executes the given command by first looking in the default catalog. |
boolean |
executeCommand(String catalogName,
String commandName,
Map<String,Object> params)
Executes the given command at the given catalog with the given parameters. |
Command |
getCommand(String commandName)
Use a delimiter to separate the catalog and command name. |
Command |
getCommand(String catalogName,
String commandName)
Get the command. |
static CommandsManager |
getInstance()
Deprecated. since 4.5, use IoC ! |
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 |
---|
public static final String DEFAULT_CATALOG
public static final String COMMAND_DELIM
Constructor Detail |
---|
@Inject public CommandsManager(Node2BeanProcessor nodeToBean)
Method Detail |
---|
protected void onRegister(Content node)
onRegister
in class ObservedManager
protected void registerCatalog(Content node)
protected void onClear()
onClear
in class ObservedManager
public Command getCommand(String catalogName, String commandName)
catalogName
- the catalog containing the commandcommandName
- the name of the command
public Command getCommand(String commandName)
@Deprecated public static CommandsManager getInstance()
public boolean executeCommand(String catalogName, String commandName, Map<String,Object> params) throws Exception
Exception
- if an error occurs during command execution or if the command
could not be found in any catalog.public boolean executeCommand(String commandName, Map<String,Object> params) throws Exception
Exception
executeCommand(String, String, Map)
public boolean executeCommand(Command command, Map<String,Object> params) throws Exception
Exception
executeCommand(String, Map)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |