Class BulkUndoableOperation
- java.lang.Object
-
- de.hybris.platform.cockpit.model.undo.impl.BulkUndoableOperation
-
- All Implemented Interfaces:
UndoableOperation
public class BulkUndoableOperation extends java.lang.Object implements UndoableOperation
Holds a list of undo-able operations which can be undone/re-done as a bulk operation (at once).
-
-
Constructor Summary
Constructors Constructor Description BulkUndoableOperation(java.util.List<UndoableOperation> operations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanRedo()Returns true is the operation can be redone.booleancanUndo()Returns true if the operation can be undone.java.util.List<UndoableOperation>getOperations()java.lang.StringgetRedoContextDescription()java.lang.StringgetRedoPresentationName()A human readable description of the re-do operation (such as "Re-do edit").java.lang.StringgetUndoContextDescription()java.lang.StringgetUndoPresentationName()A human readable description of the undo operation (such as "Undo edit").booleanisShowOperationCount()voidredo()Redo the operation that has been undone.voidsetShowOperationCount(boolean showOperationCount)voidundo()Undo the operation.
-
-
-
Constructor Detail
-
BulkUndoableOperation
public BulkUndoableOperation(java.util.List<UndoableOperation> operations)
-
-
Method Detail
-
setShowOperationCount
public void setShowOperationCount(boolean showOperationCount)
-
isShowOperationCount
public boolean isShowOperationCount()
-
getOperations
public java.util.List<UndoableOperation> getOperations()
-
canUndo
public boolean canUndo()
Description copied from interface:UndoableOperationReturns true if the operation can be undone. May return false if in the meantime the object model is in a state that this operation cannot be made undone anymore.- Specified by:
canUndoin interfaceUndoableOperation- Returns:
- true is the operation can be undone, false otherwise
-
canRedo
public boolean canRedo()
Description copied from interface:UndoableOperationReturns true is the operation can be redone. May return false if in the meantime the object model is in a state that this operation cannot be made redone. Note that you don't have to keep track if the operation has been undone.- Specified by:
canRedoin interfaceUndoableOperation- Returns:
- true is the operation can be redone, false otherwise
-
getUndoPresentationName
public java.lang.String getUndoPresentationName()
Description copied from interface:UndoableOperationA human readable description of the undo operation (such as "Undo edit").- Specified by:
getUndoPresentationNamein interfaceUndoableOperation- Returns:
- human readable description of the undo operation (such as "Undo edit")
-
getRedoPresentationName
public java.lang.String getRedoPresentationName()
Description copied from interface:UndoableOperationA human readable description of the re-do operation (such as "Re-do edit").- Specified by:
getRedoPresentationNamein interfaceUndoableOperation- Returns:
- human readable description of the re-do operation (such as "Re-do edit")
-
undo
public void undo() throws CannotUndoExceptionDescription copied from interface:UndoableOperationUndo the operation.- Specified by:
undoin interfaceUndoableOperation- Throws:
CannotUndoException- if the operation cannot be undone anymore- See Also:
UndoableOperation.canUndo()
-
redo
public void redo() throws CannotRedoExceptionDescription copied from interface:UndoableOperationRedo the operation that has been undone.- Specified by:
redoin interfaceUndoableOperation- Throws:
CannotRedoException- if the operation cannot be redone anymore- See Also:
UndoableOperation.canRedo()
-
getRedoContextDescription
public java.lang.String getRedoContextDescription()
- Specified by:
getRedoContextDescriptionin interfaceUndoableOperation
-
getUndoContextDescription
public java.lang.String getUndoContextDescription()
- Specified by:
getUndoContextDescriptionin interfaceUndoableOperation
-
-