AbstractCommand
Summary
AbstractCommand
Base class for all commands. Handles invalid command requests. eg: attempting to undo a command that hasn't been executed will throw a CommandHistoryError.
Proper use of CommandManager will help you avoid these types of errors.
Constructor
aeris.commands.AbstractCommand
Syntax
aeris.commands.AbstractCommand
()
Summary
Methods
execute
Syntax
Summary
Execute the command. wrapper around {aeris.commands.AbstractCommand}#execute_
Note that classes extending from {aeris.commands.AbstractCommand} should override the protected {aeris.commands.AbstractCommand}#execute_ method, which is called by the public {aeris.commands.AbstractCommand}#execute method.
Returns:
A promise to complete execution of the command.
execute_
Syntax
Summary
Handle the business logic of executing a command. Must return a {aeris.Promise}
Returns:
A promise to execute the command.
undo
Syntax
Summary
Undo a command wrapper around {aeris.commands.AbstractCommand}#undo_
Note that classes extending from {aeris.commands.AbstractCommand} should override the protected {aeris.commands.AbstractCommand}#undo_ method, which is called by the public {aeris.commands.AbstractCommand}#undo method.
Returns:
A promise to complete the undo.