|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.version.undo.UndoPageVersionManager
public class UndoPageVersionManager
A version manager implemented by recording component changes as undo records which can later be reversed to get back to a given version of the page being managed.
| Constructor Summary | |
|---|---|
UndoPageVersionManager(Page page,
int maxVersions)
Constructor |
|
| Method Summary | |
|---|---|
void |
beginVersion(boolean mergeVersion)
Called when changes are immediately impending to the Page being managed. |
void |
componentAdded(Component component)
Indicates that the given component was added. |
void |
componentModelChanging(Component component)
Indicates that the model for the given component is about to change. |
void |
componentRemoved(Component component)
Indicates that the given component was removed. |
void |
componentStateChanging(Change change)
Indicates an internal state for the given component is about to change. |
void |
endVersion(boolean mergeVersion)
Called when changes to the page have ended. |
void |
expireOldestVersion()
Expires an old version |
int |
getAjaxVersionNumber()
|
int |
getCurrentVersionNumber()
|
Page |
getVersion(int versionNumber)
Retrieves a given Page version. |
int |
getVersions()
|
void |
ignoreVersionMerge()
Call this method when the current (ajax) request shouldn't merge the changes that are happening to the page with the previous version. |
Page |
rollbackPage(int numberOfVersions)
This method rollbacks the page the number of versions specified Including the ajax versions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UndoPageVersionManager(Page page,
int maxVersions)
page - The page that we're tracking changes tomaxVersions - The maximum number of versions to maintain before expiring the
old versions| Method Detail |
|---|
public void beginVersion(boolean mergeVersion)
IPageVersionManagerIn requests where a Page is not changed at all, beginVersion will never be called, nor will any of the other methods in this interface.
beginVersion in interface IPageVersionManagermergeVersion - If this is set the version that was created is merged with the previous one.IPageVersionManager.beginVersion(boolean)public void ignoreVersionMerge()
IPageVersionManager
ignoreVersionMerge in interface IPageVersionManagerIPageVersionManager.ignoreVersionMerge()public void componentAdded(Component component)
IPageVersionManager
componentAdded in interface IPageVersionManagercomponent - The component that was added.IPageVersionManager.componentAdded(org.apache.wicket.Component)public void componentModelChanging(Component component)
IPageVersionManager
componentModelChanging in interface IPageVersionManagercomponent - The component whose model is about to changeIPageVersionManager.componentModelChanging(org.apache.wicket.Component)public void componentRemoved(Component component)
IPageVersionManager
componentRemoved in interface IPageVersionManagercomponent - The component that was removed.IPageVersionManager.componentRemoved(org.apache.wicket.Component)public void componentStateChanging(Change change)
IPageVersionManager
componentStateChanging in interface IPageVersionManagerchange - The change which represents the internal stateIPageVersionManager.componentStateChanging(org.apache.wicket.version.undo.Change)public void endVersion(boolean mergeVersion)
IPageVersionManager
endVersion in interface IPageVersionManagermergeVersion - If this is set the version that was created is merged with the previous one.IPageVersionManager.endVersion(boolean)public void expireOldestVersion()
expireOldestVersion in interface IPageVersionManagerpublic int getCurrentVersionNumber()
getCurrentVersionNumber in interface IPageVersionManagerIPageVersionManager.getCurrentVersionNumber()public int getAjaxVersionNumber()
getAjaxVersionNumber in interface IPageVersionManagerIPageVersionManager.getAjaxVersionNumber()public Page getVersion(int versionNumber)
IPageVersionManager
getVersion in interface IPageVersionManagerversionNumber - The version of the page to get
IPageVersionManager.getVersion(int)public Page rollbackPage(int numberOfVersions)
IPageVersionManager
rollbackPage in interface IPageVersionManagerIPageVersionManager.rollbackPage(int)public int getVersions()
getVersions in interface IPageVersionManagerIPageVersionManager.getVersions()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||