Interface Undoable<CTX,​RET,​E extends Exception>

Type Parameters:
CTX - The context type to use, can by any Component, service or POJO.
RET - The return type of the Undoable's proceedings.
E - The exception type of the Undoable's erroneous termination.
All Superinterfaces:
Command<CTX,​RET,​E>
All Known Implementing Classes:
AbstractUndoable

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.
  • Method Summary

    Modifier and Type Method Description
    boolean isUndoable​(CTX aContext)
    This method determines whether the Undoable can undo the work it has done.
    void undo​(CTX aContext)
    This method tries to undo the Undoable in case it was successfully executed.

    Methods inherited from interface org.refcodes.command.Command

    execute