public class EditHistoryTrackingPropertyImpl extends com.vaadin.v7.data.util.TransactionalPropertyWrapper<byte[]> implements EditHistoryTrackingProperty
com.vaadin.v7.data.util.AbstractProperty.ReadOnlyStatusChangeEvent
EditHistoryTrackingProperty.Listener
com.vaadin.v7.data.Property.Editor, com.vaadin.v7.data.Property.ReadOnlyException, com.vaadin.v7.data.Property.ReadOnlyStatusChangeEvent, com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener, com.vaadin.v7.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.v7.data.Property.Transactional<T>, com.vaadin.v7.data.Property.ValueChangeEvent, com.vaadin.v7.data.Property.ValueChangeListener, com.vaadin.v7.data.Property.ValueChangeNotifier, com.vaadin.v7.data.Property.Viewer
Constructor and Description |
---|
EditHistoryTrackingPropertyImpl(byte[] bytes,
info.magnolia.i18nsystem.SimpleTranslator i18n) |
Modifier and Type | Method and Description |
---|---|
void |
commit()
Propagate changes to the original value.
|
String |
getLastDoneActionName()
Gets the last done action name.
|
String |
getLastUnDoneActionName()
Gets the last undone action name.
|
void |
purgeHistory()
Clears modification history which erases all the tracked steps.
|
void |
redo()
Redo last step.
|
void |
revert()
Roll back to original value.
|
void |
setCapacity(int depth)
Sets the amount of steps that can be tracked.
|
void |
setListener(EditHistoryTrackingProperty.Listener listener) |
void |
setValue(byte[] bytes) |
void |
startAction(String actionName)
Starts an action which will cause a new record to appear in history.
|
void |
undo()
Undo last step.
|
detachFromProperty, endTransaction, fireValueChange, getType, getValue, getWrappedProperty, isReadOnly, rollback, setReadOnly, startTransaction
addListener, addListener, addReadOnlyStatusChangeListener, addValueChangeListener, fireReadOnlyStatusChange, getListeners, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValueChangeListener
public EditHistoryTrackingPropertyImpl(byte[] bytes, info.magnolia.i18nsystem.SimpleTranslator i18n)
public void setListener(EditHistoryTrackingProperty.Listener listener)
setListener
in interface EditHistoryTrackingProperty
public String getLastDoneActionName()
EditHistoryTrackingProperty
getLastDoneActionName
in interface EditHistoryTrackingProperty
public String getLastUnDoneActionName()
EditHistoryTrackingProperty
getLastUnDoneActionName
in interface EditHistoryTrackingProperty
public void purgeHistory()
EditHistoryTrackingProperty
purgeHistory
in interface EditHistoryTrackingProperty
public void setCapacity(int depth)
EditHistoryTrackingProperty
setCapacity
in interface EditHistoryTrackingProperty
depth
- amount of steps to be available for undo/redo.public void startAction(String actionName)
EditHistoryTrackingProperty
startAction
in interface EditHistoryTrackingProperty
actionName
- the name of an action.public void undo()
EditHistoryTrackingProperty
undo
in interface EditHistoryTrackingProperty
public void redo()
EditHistoryTrackingProperty
redo
in interface EditHistoryTrackingProperty
public void revert()
EditHistoryTrackingProperty
revert
in interface EditHistoryTrackingProperty
public void commit()
EditHistoryTrackingProperty
commit
in interface com.vaadin.v7.data.Property.Transactional<byte[]>
commit
in interface EditHistoryTrackingProperty
commit
in class com.vaadin.v7.data.util.TransactionalPropertyWrapper<byte[]>
public void setValue(byte[] bytes) throws com.vaadin.v7.data.Property.ReadOnlyException
setValue
in interface com.vaadin.v7.data.Property<byte[]>
setValue
in class com.vaadin.v7.data.util.TransactionalPropertyWrapper<byte[]>
com.vaadin.v7.data.Property.ReadOnlyException
Copyright © 2019 Magnolia International Ltd.. All rights reserved.