|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.data.util.AbstractProperty<T> com.vaadin.data.util.TransactionalPropertyWrapper<byte[]> info.magnolia.ui.mediaeditor.data.EditHistoryTrackingPropertyImpl
public class EditHistoryTrackingPropertyImpl
Property implementation that uses temporary files for storing the intermediate results of data modification. Tracking is done in both direction - steps can undone and redone. Original data is stored in memory and the value can be rolled back to it.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.vaadin.data.util.AbstractProperty |
---|
com.vaadin.data.util.AbstractProperty.ReadOnlyStatusChangeEvent |
Nested classes/interfaces inherited from interface info.magnolia.ui.mediaeditor.data.EditHistoryTrackingProperty |
---|
EditHistoryTrackingProperty.Listener |
Nested classes/interfaces inherited from interface com.vaadin.data.Property |
---|
com.vaadin.data.Property.Editor, com.vaadin.data.Property.ReadOnlyException, com.vaadin.data.Property.ReadOnlyStatusChangeEvent, com.vaadin.data.Property.ReadOnlyStatusChangeListener, com.vaadin.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.data.Property.Transactional<T>, com.vaadin.data.Property.ValueChangeEvent, com.vaadin.data.Property.ValueChangeListener, com.vaadin.data.Property.ValueChangeNotifier, com.vaadin.data.Property.Viewer |
Constructor Summary | |
---|---|
EditHistoryTrackingPropertyImpl(byte[] bytes,
info.magnolia.i18nsystem.SimpleTranslator i18n)
|
Method Summary | |
---|---|
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. |
Methods inherited from class com.vaadin.data.util.TransactionalPropertyWrapper |
---|
endTransaction, fireValueChange, getType, getValue, getWrappedProperty, isReadOnly, rollback, setReadOnly, startTransaction |
Methods inherited from class com.vaadin.data.util.AbstractProperty |
---|
addListener, addListener, addReadOnlyStatusChangeListener, addValueChangeListener, fireReadOnlyStatusChange, getListeners, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValueChangeListener, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.vaadin.data.Property |
---|
getType, getValue, isReadOnly, setReadOnly |
Methods inherited from interface com.vaadin.data.Property.ValueChangeNotifier |
---|
addListener, addValueChangeListener, removeListener, removeValueChangeListener |
Constructor Detail |
---|
public EditHistoryTrackingPropertyImpl(byte[] bytes, info.magnolia.i18nsystem.SimpleTranslator i18n)
Method Detail |
---|
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.data.Property.Transactional<byte[]>
commit
in interface EditHistoryTrackingProperty
commit
in class com.vaadin.data.util.TransactionalPropertyWrapper<byte[]>
public void setValue(byte[] bytes) throws com.vaadin.data.Property.ReadOnlyException
setValue
in interface com.vaadin.data.Property<byte[]>
setValue
in class com.vaadin.data.util.TransactionalPropertyWrapper<byte[]>
com.vaadin.data.Property.ReadOnlyException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |