@Singleton public class CommandsManager extends ModuleConfigurationObservingManager
commands
.Modifier and Type | Field and Description |
---|---|
static String |
COMMAND_DELIM |
static String |
DEFAULT_CATALOG |
Constructor and Description |
---|
CommandsManager(ModuleRegistry moduleRegistry,
Node2BeanProcessor nodeToBean,
EventBus systemEventBus) |
CommandsManager(Node2BeanProcessor nodeToBean)
Deprecated.
since 5.4.5 use
CommandsManager(ModuleRegistry, Node2BeanProcessor, EventBus) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Deprecated.
since 5.4.5. Use
ModuleConfigurationObservingManager.onClear() instead. |
boolean |
executeCommand(Command command,
Map<String,Object> params)
Executes the given command with the given parameters.
|
boolean |
executeCommand(Command command,
Map<String,Object> params,
Context context)
Executes the given command with given context.
|
boolean |
executeCommand(String commandName,
Map<String,Object> params)
Executes the given command in the default catalog with the given parameters.
|
boolean |
executeCommand(String catalogName,
String commandName,
Map<String,Object> params)
Executes the given command in 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 |
onRegister(Content node)
Deprecated.
since 5.4.5. Use
reload(java.util.List) instead. |
void |
register(Content content)
Deprecated.
since 5.4.5. Use
reload(java.util.List) instead. |
protected void |
registerCatalog(Content node)
Deprecated.
since 5.4.5. Use
reload(java.util.List) instead. |
protected void |
registerCatalog(javax.jcr.Node node,
Map<String,MgnlCatalog> catalogs) |
protected void |
registerCatalogs(javax.jcr.Node node,
Map<String,MgnlCatalog> catalogs) |
void |
reload()
Deprecated.
since 5.4.5. This should not be public but only protected. Use
super#reload() instead. |
protected void |
reload(List<javax.jcr.Node> nodes) |
getObservedNodes, getObservedPaths, getSession, onClear, onRegister, onStart, registerChangeListener
getDelay, getEventTypesMask, getMaxDelay, getNodeTypes, getObservedPath, getReloadMonitor, getWorkspace, instantiateEventListener, isIncludeSubNodes, setDelay, setMaxDelay, start
public static final String DEFAULT_CATALOG
public static final String COMMAND_DELIM
@Inject public CommandsManager(ModuleRegistry moduleRegistry, Node2BeanProcessor nodeToBean, @Named(value="system") EventBus systemEventBus)
@Deprecated public CommandsManager(Node2BeanProcessor nodeToBean)
CommandsManager(ModuleRegistry, Node2BeanProcessor, EventBus)
protected void reload(List<javax.jcr.Node> nodes) throws javax.jcr.RepositoryException
reload
in class ModuleConfigurationObservingManager
javax.jcr.RepositoryException
protected void registerCatalogs(javax.jcr.Node node, Map<String,MgnlCatalog> catalogs) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected void registerCatalog(javax.jcr.Node node, Map<String,MgnlCatalog> catalogs)
public Command getCommand(String catalogName, String commandName)
catalogName
- the catalog containing the commandcommandName
- the name of the commandpublic 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 execution or if the command could not be found in any catalogpublic boolean executeCommand(String commandName, Map<String,Object> params) throws Exception
Exception
- if an error occurs during execution or if the command could not be found in any catalogexecuteCommand(String, String, Map)
public boolean executeCommand(Command command, Map<String,Object> params) throws Exception
Exception
- if an error occurs during execution or if the command could not be found in any catalogexecuteCommand(String, Map)
public boolean executeCommand(Command command, Map<String,Object> params, Context context) throws Exception
Exception
executeCommand(String, Map)
@Deprecated protected void onRegister(Content node)
reload(java.util.List)
instead.@Deprecated public void register(Content content)
reload(java.util.List)
instead.@Deprecated protected void registerCatalog(Content node)
reload(java.util.List)
instead.@Deprecated public void reload()
super#reload()
instead.reload
in class ModuleConfigurationObservingManager
@Deprecated public void clear()
ModuleConfigurationObservingManager.onClear()
instead.Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.