Class ItemChangeUndoableOperation
- java.lang.Object
-
- de.hybris.platform.cockpit.model.undo.impl.ItemChangeUndoableOperation
-
- All Implemented Interfaces:
UndoableOperation
public class ItemChangeUndoableOperation extends java.lang.Object implements UndoableOperation
An undo-able operation representing changing value of a property of an item.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
redoPresentationName
protected ObjectValueContainer
redoValueContainer
protected TypedObject
typedObject
protected java.lang.String
undoPresentationName
protected ObjectValueContainer
valueContainer
-
Constructor Summary
Constructors Constructor Description ItemChangeUndoableOperation(TypedObject typedObject, ObjectValueContainer valueContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRedo()
Returns true is the operation can be redone.boolean
canUndo()
Returns true if the operation can be undone.java.lang.String
getRedoContextDescription()
java.lang.String
getRedoPresentationName()
A human readable description of the re-do operation (such as "Re-do edit").protected ObjectValueContainer
getRedoValueContainer()
java.lang.String
getUndoContextDescription()
java.lang.String
getUndoPresentationName()
A human readable description of the undo operation (such as "Undo edit").void
redo()
Redo the operation that has been undone.void
undo()
Undo the operation.
-
-
-
Field Detail
-
typedObject
protected TypedObject typedObject
-
valueContainer
protected ObjectValueContainer valueContainer
-
redoValueContainer
protected ObjectValueContainer redoValueContainer
-
undoPresentationName
protected java.lang.String undoPresentationName
-
redoPresentationName
protected java.lang.String redoPresentationName
-
-
Constructor Detail
-
ItemChangeUndoableOperation
public ItemChangeUndoableOperation(TypedObject typedObject, ObjectValueContainer valueContainer)
-
-
Method Detail
-
canUndo
public boolean canUndo()
Description copied from interface:UndoableOperation
Returns 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:
canUndo
in interfaceUndoableOperation
- Returns:
- true is the operation can be undone, false otherwise
-
canRedo
public boolean canRedo()
Description copied from interface:UndoableOperation
Returns 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:
canRedo
in interfaceUndoableOperation
- Returns:
- true is the operation can be redone, false otherwise
-
getUndoPresentationName
public java.lang.String getUndoPresentationName()
Description copied from interface:UndoableOperation
A human readable description of the undo operation (such as "Undo edit").- Specified by:
getUndoPresentationName
in interfaceUndoableOperation
- Returns:
- human readable description of the undo operation (such as "Undo edit")
-
getRedoPresentationName
public java.lang.String getRedoPresentationName()
Description copied from interface:UndoableOperation
A human readable description of the re-do operation (such as "Re-do edit").- Specified by:
getRedoPresentationName
in interfaceUndoableOperation
- Returns:
- human readable description of the re-do operation (such as "Re-do edit")
-
undo
public void undo() throws CannotUndoException
Description copied from interface:UndoableOperation
Undo the operation.- Specified by:
undo
in interfaceUndoableOperation
- Throws:
CannotUndoException
- if the operation cannot be undone anymore- See Also:
UndoableOperation.canUndo()
-
redo
public void redo() throws CannotRedoException
Description copied from interface:UndoableOperation
Redo the operation that has been undone.- Specified by:
redo
in interfaceUndoableOperation
- Throws:
CannotRedoException
- if the operation cannot be redone anymore- See Also:
UndoableOperation.canRedo()
-
getRedoValueContainer
protected ObjectValueContainer getRedoValueContainer()
-
getUndoContextDescription
public java.lang.String getUndoContextDescription()
- Specified by:
getUndoContextDescription
in interfaceUndoableOperation
-
getRedoContextDescription
public java.lang.String getRedoContextDescription()
- Specified by:
getRedoContextDescription
in interfaceUndoableOperation
-
-