Module org.refcodes.command
Package org.refcodes.command
Interface Undoable<CTX,RET,E extends Exception>
- Type Parameters:
CTX- The context type to use, can by anyComponent, service or POJO.RET- The return type of theUndoable's proceedings.E- The exception type of theUndoable's erroneous termination.
- All Superinterfaces:
Command<CTX,RET, E>
- All Known Implementing Classes:
AbstractUndoable
-
Method Summary
-
Method Details
-
isUndoable
This method determines whether theUndoablecan undo the work it has done. -
undo
This method tries to undo theUndoablein case it was successfully executed. Test viaisUndoable(Object)beforehand to see whether a call toundo(Object)can be applied.- Parameters:
aContext- The target object which is used by theUndoableto do itsUndoable.- Throws:
NotUndoableRuntimeException- Thrown in case the performed operation cannot be undone, or no operation as been done before by thisUndoable.UnsupportedOperationException- Thrown in case theUndoabledoes not provide undo facilities.
-