Interface Command<T,V>
-
- All Known Implementing Classes:
AbstractCommand
public interface Command<T,V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommandResult<V>allow(T context)Check whether the command operation is allowed.CommandResult<V>execute(T context)Executes the command operation.CommandResult<V>undo(T context)Undo the changes done by this command execution.
-
-
-
Method Detail
-
allow
CommandResult<V> allow(T context)
Check whether the command operation is allowed. Does not perform any update or mutation.
-
execute
CommandResult<V> execute(T context)
Executes the command operation. Does perform some update or mutation.
-
undo
CommandResult<V> undo(T context)
Undo the changes done by this command execution.
-
-