public class VersionManagerImpl extends VersionManagerImplConfig implements VersionManager
VersionManager.
This class implements the JCR Version Manager interface but most of the operations are performed in the super classes. this is only cosmetic to avoid huge source files.
VersionManagerImplBase.WriteOperationcontext, currentActivity, hierMgr, ntReg, session, stateMgr, vMgr| Constructor and Description |
|---|
VersionManagerImpl(SessionContext context,
UpdatableItemStateManager stateMgr,
HierarchyManager hierMgr)
Creates a new version manager
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelMerge(String absPath,
Version version) |
Version |
checkin(String absPath)
Wrapper around
checkin(String, Calendar). |
Version |
checkin(String absPath,
Calendar created)
Creates a new version of the node at the given path.
|
void |
checkout(String absPath) |
Version |
checkpoint(String absPath) |
Node |
createActivity(String title) |
Node |
createConfiguration(String absPath) |
void |
doneMerge(String absPath,
Version version) |
Node |
getActivity() |
Version |
getBaseVersion(String absPath) |
VersionHistory |
getVersionHistory(String absPath) |
boolean |
isCheckedOut(String absPath)
Wrapper around
Node.isCheckedOut(). |
NodeIterator |
merge(Node activityNode) |
NodeIterator |
merge(String absPath,
String srcWorkspace,
boolean bestEffort)
Wrapper around
merge(String, String, boolean, boolean). |
NodeIterator |
merge(String absPath,
String srcWorkspaceName,
boolean bestEffort,
boolean isShallow) |
void |
removeActivity(Node node) |
protected void |
restore(NodeImpl node,
Version version,
boolean removeExisting)
Same as
restore(String, String, boolean) but to ensure
backward compatibility for Node.restore(Version, boolean). |
void |
restore(String absPath,
String versionName,
boolean removeExisting) |
void |
restore(String absPath,
Version version,
boolean removeExisting) |
void |
restore(Version[] versions,
boolean removeExisting) |
void |
restore(Version version,
boolean removeExisting)
Wrapper around
restore(Version[], boolean). |
void |
restoreByLabel(String absPath,
String versionLabel,
boolean removeExisting) |
Node |
setActivity(Node activity) |
void |
update(NodeImpl node,
String srcWorkspaceName)
Does an update.
|
createConfiguration, restorefinishMerge, merge, mergeinternalRestore, internalRestore, internalRestoreFrozen, restore, restore, restore, restoreByLabelacquireReadLock, acquireWriteLock, checkModify, checkModify, checkoutCheckin, checkVersionable, getBaseVersion, getBaseVersionId, getNodeStateEx, getVersion, getVersionHistory, isCheckedOut, safeGetJCRPath, startWriteOperationpublic VersionManagerImpl(SessionContext context, UpdatableItemStateManager stateMgr, HierarchyManager hierMgr)
context - component context of the current sessionstateMgr - the underlying state managerhierMgr - local hierarchy managerpublic Version checkin(String absPath) throws RepositoryException
checkin(String, Calendar).checkin in interface VersionManagerRepositoryExceptionpublic Version checkin(String absPath, Calendar created) throws RepositoryException
absPath - node pathcreated - create time of the new version,
or null for the current timeRepositoryException - if the version can not be createdpublic void checkout(String absPath) throws RepositoryException
checkout in interface VersionManagerRepositoryExceptionpublic Version checkpoint(String absPath) throws RepositoryException
checkpoint in interface VersionManagerRepositoryExceptionpublic boolean isCheckedOut(String absPath) throws RepositoryException
Node.isCheckedOut().isCheckedOut in interface VersionManagerRepositoryExceptionpublic VersionHistory getVersionHistory(String absPath) throws RepositoryException
getVersionHistory in interface VersionManagerRepositoryExceptionpublic Version getBaseVersion(String absPath) throws RepositoryException
getBaseVersion in interface VersionManagerRepositoryExceptionpublic void restore(Version version, boolean removeExisting) throws RepositoryException
restore(Version[], boolean).restore in interface VersionManagerRepositoryExceptionpublic void restore(Version[] versions, boolean removeExisting) throws RepositoryException
restore in interface VersionManagerRepositoryExceptionpublic void restore(String absPath, String versionName, boolean removeExisting) throws RepositoryException
restore in interface VersionManagerRepositoryExceptionpublic void restore(String absPath, Version version, boolean removeExisting) throws RepositoryException
restore in interface VersionManagerRepositoryExceptionprotected void restore(NodeImpl node, Version version, boolean removeExisting) throws RepositoryException
restore(String, String, boolean) but to ensure
backward compatibility for Node.restore(Version, boolean).node - the node to restoreversion - the version to restoreremoveExisting - the remove existing flagRepositoryException - if an error occurspublic void restoreByLabel(String absPath, String versionLabel, boolean removeExisting) throws RepositoryException
restoreByLabel in interface VersionManagerRepositoryExceptionpublic void update(NodeImpl node, String srcWorkspaceName) throws RepositoryException
node - the node to updatesrcWorkspaceName - the source workspace nameRepositoryException - if an error occursNode.update(String)public NodeIterator merge(String absPath, String srcWorkspace, boolean bestEffort) throws RepositoryException
merge(String, String, boolean, boolean).merge in interface VersionManagerRepositoryExceptionpublic NodeIterator merge(String absPath, String srcWorkspaceName, boolean bestEffort, boolean isShallow) throws RepositoryException
merge in interface VersionManagerRepositoryExceptionpublic void doneMerge(String absPath, Version version) throws RepositoryException
doneMerge in interface VersionManagerRepositoryExceptionpublic void cancelMerge(String absPath, Version version) throws RepositoryException
cancelMerge in interface VersionManagerRepositoryExceptionpublic Node createConfiguration(String absPath) throws RepositoryException
createConfiguration in interface VersionManagerRepositoryExceptionpublic Node setActivity(Node activity) throws RepositoryException
setActivity in interface VersionManagerRepositoryExceptionpublic Node getActivity() throws RepositoryException
getActivity in interface VersionManagerRepositoryExceptionpublic Node createActivity(String title) throws RepositoryException
createActivity in interface VersionManagerRepositoryExceptionpublic void removeActivity(Node node) throws RepositoryException
removeActivity in interface VersionManagerRepositoryExceptionpublic NodeIterator merge(Node activityNode) throws RepositoryException
merge in interface VersionManagerRepositoryExceptionCopyright © 2004–2022 The Apache Software Foundation. All rights reserved.