public interface Undoable<CTX, RET, E extends Exception>
extends Command<CTX,RET,E>
An Undoable is a Command) which also provides means to undo
its operation applied before. The Undoable is created by a client
(e.g. the business logic) and passed to something like a command-bus or
command-processor for execution.
This method tries to undo the Undoable in case it was
successfully executed. Test via isUndoable(Object) beforehand to
see whether a call to undo(Object) can be applied.
Parameters:
aContext - The target object which is used by the Undoable
to do its Undoable.
Throws:
NotUndoableRuntimeException - Thrown in case the performed
operation cannot be undone, or no operation as been done before
by this Undoable.