public abstract class VersionManagerImplRestore extends VersionManagerImplBase
this class provides methods for the restore operations.
Implementation note: methods starting with "internal" are considered to be executed within a "write operations" block.
VersionManagerImplBase.WriteOperation
context, currentActivity, hierMgr, ntReg, session, stateMgr, vMgr
Modifier | Constructor and Description |
---|---|
protected |
VersionManagerImplRestore(SessionContext context,
UpdatableItemStateManager stateMgr,
HierarchyManager hierMgr)
Creates a new version manager for the given session
|
Modifier and Type | Method and Description |
---|---|
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) |
acquireReadLock, acquireWriteLock, checkModify, checkModify, checkoutCheckin, checkVersionable, getBaseVersion, getBaseVersionId, getNodeStateEx, getVersion, getVersionHistory, isCheckedOut, safeGetJCRPath, startWriteOperation
protected VersionManagerImplRestore(SessionContext context, UpdatableItemStateManager stateMgr, HierarchyManager hierMgr)
context
- component context of the current sessionstateMgr
- the underlying state managerhierMgr
- local hierarchy managerprotected void restore(NodeStateEx state, InternalVersion v, boolean removeExisting) throws RepositoryException
state
- the state to restorev
- the version to restoreremoveExisting
- remove existing flagRepositoryException
- if an error occursVersionManager.restore(String, Version, boolean)
protected void restore(NodeStateEx state, Name versionName, boolean removeExisting) throws RepositoryException
state
- the state to restoreversionName
- the name of the version to restoreremoveExisting
- remove existing flagRepositoryException
- if an error occursVersionManager.restore(String, String, boolean)
protected void restoreByLabel(NodeStateEx state, Name versionLabel, boolean removeExisting) throws RepositoryException
state
- the state to restoreversionLabel
- the name of the version to restoreremoveExisting
- remove existing flagRepositoryException
- if an error occursVersionManager.restoreByLabel(String, String, boolean)
protected void restore(NodeStateEx parent, Name name, InternalVersion v, boolean removeExisting) throws RepositoryException
version
below the parent
node
using the indicated name
parent
- parent nodename
- desired namev
- version to restoreremoveExisting
- remove exiting flagRepositoryException
- if an error occursprotected void internalRestore(VersionSet versions, boolean removeExisting) throws RepositoryException, ItemStateException
versions
- Versions to restoreremoveExisting
- remove existing flagRepositoryException
- if an error occursItemStateException
- if an error occursVersionManager.restore(Version[], boolean)
,
VersionManager.restore(Version, boolean)
protected Set<InternalVersion> internalRestore(NodeStateEx state, InternalVersion version, VersionSelector vsel, boolean removeExisting) throws RepositoryException, ItemStateException
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 flagRepositoryException
- if an error occursItemStateException
- if an error occursprotected void internalRestoreFrozen(NodeStateEx state, InternalFrozenNode freeze, VersionSelector vsel, Set<InternalVersion> restored, boolean removeExisting, boolean copy) throws RepositoryException, ItemStateException
state
- state to restorefreeze
- the frozen nodevsel
- version selectorrestored
- set of restored versionsremoveExisting
- remove existing flagcopy
- if true
a pure copy is performedRepositoryException
- if an error occursItemStateException
- if an error occursCopyright © 2004–2021 The Apache Software Foundation. All rights reserved.