Class CommandManagerImpl<C,V>
- java.lang.Object
-
- org.kie.workbench.common.command.client.impl.CommandManagerImpl<C,V>
-
- All Implemented Interfaces:
CommandManager<C,V>,HasCommandListener<CommandListener<C,V>>
public class CommandManagerImpl<C,V> extends Object implements CommandManager<C,V>, HasCommandListener<CommandListener<C,V>>
-
-
Constructor Summary
Constructors Constructor Description CommandManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandResult<V>allow(C context, Command<C,V> command)Check whether the given command can be executed.CommandResult<V>execute(C context, Command<C,V> command)Execute the given command.voidsetCommandListener(CommandListener<C,V> listener)CommandResult<V>undo(C context, Command<C,V> command)Undo an executed command.
-
-
-
Method Detail
-
allow
public CommandResult<V> allow(C context, Command<C,V> command)
Description copied from interface:CommandManagerCheck whether the given command can be executed.- Specified by:
allowin interfaceCommandManager<C,V>
-
execute
public CommandResult<V> execute(C context, Command<C,V> command)
Description copied from interface:CommandManagerExecute the given command.- Specified by:
executein interfaceCommandManager<C,V>
-
undo
public CommandResult<V> undo(C context, Command<C,V> command)
Description copied from interface:CommandManagerUndo an executed command.- Specified by:
undoin interfaceCommandManager<C,V>
-
setCommandListener
public void setCommandListener(CommandListener<C,V> listener)
- Specified by:
setCommandListenerin interfaceHasCommandListener<C>
-
-