org.apache.jackrabbit.core.version
Class VersionManagerImplRestore
java.lang.Object
org.apache.jackrabbit.core.version.VersionManagerImplBase
org.apache.jackrabbit.core.version.VersionManagerImplRestore
- Direct Known Subclasses:
- VersionManagerImplMerge
public abstract class VersionManagerImplRestore
- extends VersionManagerImplBase
The JCR Version Manager impementation is split in several classes in order to
group related methods together.
this class provides methods for the restore operations.
Implementation note: methods starting with "internal" are considered to be
executed within a "write operations" block.
|
Method Summary |
protected Set<InternalVersion> |
internalRestore(NodeStateEx state,
InternalVersion version,
VersionSelector vsel,
boolean removeExisting)
Internal method to restore a version. |
protected void |
internalRestore(VersionSet versions,
boolean removeExisting)
|
protected void |
internalRestoreFrozen(NodeStateEx state,
InternalFrozenNode freeze,
VersionSelector vsel,
Set<InternalVersion> restored,
boolean removeExisting,
boolean copy)
Restores the properties and child nodes from the frozen state. |
protected void |
restore(NodeStateEx state,
InternalVersion v,
boolean removeExisting)
|
protected void |
restore(NodeStateEx state,
Name versionName,
boolean removeExisting)
|
protected void |
restore(NodeStateEx parent,
Name name,
InternalVersion v,
boolean removeExisting)
Restores the version below the parent node
using the indicated name |
protected void |
restoreByLabel(NodeStateEx state,
Name versionLabel,
boolean removeExisting)
|
| Methods inherited from class org.apache.jackrabbit.core.version.VersionManagerImplBase |
acquireReadLock, acquireWriteLock, checkModify, checkModify, checkoutCheckin, checkVersionable, getBaseVersion, getBaseVersionId, getNodeStateEx, getVersion, getVersionHistory, isCheckedOut, safeGetJCRPath, startWriteOperation |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VersionManagerImplRestore
protected VersionManagerImplRestore(SessionImpl session,
UpdatableItemStateManager stateMgr,
HierarchyManager hierMgr)
- Creates a new version manager for the given session
- Parameters:
session - workspace sesionstateMgr - the underlying state managerhierMgr - local hierarchy manager
restore
protected void restore(NodeStateEx state,
InternalVersion v,
boolean removeExisting)
throws RepositoryException
- Parameters:
state - the state to restorev - the version to restoreremoveExisting - remove existing flag
- Throws:
RepositoryException - if an error occurs- See Also:
VersionManager.restore(String, Version, boolean)
restore
protected void restore(NodeStateEx state,
Name versionName,
boolean removeExisting)
throws RepositoryException
- Parameters:
state - the state to restoreversionName - the name of the version to restoreremoveExisting - remove existing flag
- Throws:
RepositoryException - if an error occurs- See Also:
VersionManager.restore(String, String, boolean)
restoreByLabel
protected void restoreByLabel(NodeStateEx state,
Name versionLabel,
boolean removeExisting)
throws RepositoryException
- Parameters:
state - the state to restoreversionLabel - the name of the version to restoreremoveExisting - remove existing flag
- Throws:
RepositoryException - if an error occurs- See Also:
VersionManager.restoreByLabel(String, String, boolean)
restore
protected void restore(NodeStateEx parent,
Name name,
InternalVersion v,
boolean removeExisting)
throws RepositoryException
- Restores the
version below the parent node
using the indicated name
- Parameters:
parent - parent nodename - desired namev - version to restoreremoveExisting - remove exiting flag
- Throws:
RepositoryException - if an error occurs
internalRestore
protected void internalRestore(VersionSet versions,
boolean removeExisting)
throws RepositoryException,
ItemStateException
- Parameters:
versions - Versions to restoreremoveExisting - remove existing flag
- Throws:
RepositoryException - if an error occurs
ItemStateException - if an error occurs- See Also:
VersionManager.restore(Version[], boolean),
VersionManager.restore(Version, boolean)
internalRestore
protected Set<InternalVersion> internalRestore(NodeStateEx state,
InternalVersion version,
VersionSelector vsel,
boolean removeExisting)
throws RepositoryException,
ItemStateException
- Internal method to restore a version.
- Parameters:
state - the state to restoreversion - version to restorevsel - the version selector that will select the correct version for
OPV=Version child nodes.removeExisting - remove existing flag
- Returns:
- set of restored versions
- Throws:
RepositoryException - if an error occurs
ItemStateException - if an error occurs
internalRestoreFrozen
protected void internalRestoreFrozen(NodeStateEx state,
InternalFrozenNode freeze,
VersionSelector vsel,
Set<InternalVersion> restored,
boolean removeExisting,
boolean copy)
throws RepositoryException,
ItemStateException
- Restores the properties and child nodes from the frozen state.
- Parameters:
state - state to restorefreeze - the frozen nodevsel - version selectorrestored - set of restored versionsremoveExisting - remove existing flagcopy - if true a pure copy is performed
- Throws:
RepositoryException - if an error occurs
ItemStateException - if an error occurs
Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.