public class VersionManagerImpl extends VersionManagerImplConfig implements javax.jcr.version.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.WriteOperation
context, 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,
javax.jcr.version.Version version) |
javax.jcr.version.Version |
checkin(String absPath)
Wrapper around
checkin(String, Calendar) . |
javax.jcr.version.Version |
checkin(String absPath,
Calendar created)
Creates a new version of the node at the given path.
|
void |
checkout(String absPath) |
javax.jcr.version.Version |
checkpoint(String absPath) |
javax.jcr.Node |
createActivity(String title) |
javax.jcr.Node |
createConfiguration(String absPath) |
void |
doneMerge(String absPath,
javax.jcr.version.Version version) |
javax.jcr.Node |
getActivity() |
javax.jcr.version.Version |
getBaseVersion(String absPath) |
javax.jcr.version.VersionHistory |
getVersionHistory(String absPath) |
boolean |
isCheckedOut(String absPath)
Wrapper around
Node.isCheckedOut() . |
javax.jcr.NodeIterator |
merge(javax.jcr.Node activityNode) |
javax.jcr.NodeIterator |
merge(String absPath,
String srcWorkspace,
boolean bestEffort)
Wrapper around
merge(String, String, boolean, boolean) . |
javax.jcr.NodeIterator |
merge(String absPath,
String srcWorkspaceName,
boolean bestEffort,
boolean isShallow) |
void |
removeActivity(javax.jcr.Node node) |
protected void |
restore(NodeImpl node,
javax.jcr.version.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,
javax.jcr.version.Version version,
boolean removeExisting) |
void |
restore(javax.jcr.version.Version[] versions,
boolean removeExisting) |
void |
restore(javax.jcr.version.Version version,
boolean removeExisting)
Wrapper around
restore(Version[], boolean) . |
void |
restoreByLabel(String absPath,
String versionLabel,
boolean removeExisting) |
javax.jcr.Node |
setActivity(javax.jcr.Node activity) |
void |
update(NodeImpl node,
String srcWorkspaceName)
Does an update.
|
createConfiguration, restore
finishMerge, merge, merge
internalRestore, internalRestore, internalRestoreFrozen, restore, restore, restore, restoreByLabel
acquireReadLock, acquireWriteLock, checkModify, checkModify, checkoutCheckin, checkVersionable, getBaseVersion, getBaseVersionId, getNodeStateEx, getVersion, getVersionHistory, isCheckedOut, safeGetJCRPath, startWriteOperation
public VersionManagerImpl(SessionContext context, UpdatableItemStateManager stateMgr, HierarchyManager hierMgr)
context
- component context of the current sessionstateMgr
- the underlying state managerhierMgr
- local hierarchy managerpublic javax.jcr.version.Version checkin(String absPath) throws javax.jcr.RepositoryException
checkin(String, Calendar)
.checkin
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public javax.jcr.version.Version checkin(String absPath, Calendar created) throws javax.jcr.RepositoryException
absPath
- node pathcreated
- create time of the new version,
or null
for the current timejavax.jcr.RepositoryException
- if the version can not be createdpublic void checkout(String absPath) throws javax.jcr.RepositoryException
checkout
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public javax.jcr.version.Version checkpoint(String absPath) throws javax.jcr.RepositoryException
checkpoint
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public boolean isCheckedOut(String absPath) throws javax.jcr.RepositoryException
Node.isCheckedOut()
.isCheckedOut
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public javax.jcr.version.VersionHistory getVersionHistory(String absPath) throws javax.jcr.RepositoryException
getVersionHistory
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public javax.jcr.version.Version getBaseVersion(String absPath) throws javax.jcr.RepositoryException
getBaseVersion
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public void restore(javax.jcr.version.Version version, boolean removeExisting) throws javax.jcr.RepositoryException
restore(Version[], boolean)
.restore
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public void restore(javax.jcr.version.Version[] versions, boolean removeExisting) throws javax.jcr.RepositoryException
restore
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public void restore(String absPath, String versionName, boolean removeExisting) throws javax.jcr.RepositoryException
restore
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public void restore(String absPath, javax.jcr.version.Version version, boolean removeExisting) throws javax.jcr.RepositoryException
restore
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
protected void restore(NodeImpl node, javax.jcr.version.Version version, boolean removeExisting) throws javax.jcr.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 flagjavax.jcr.RepositoryException
- if an error occurspublic void restoreByLabel(String absPath, String versionLabel, boolean removeExisting) throws javax.jcr.RepositoryException
restoreByLabel
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public void update(NodeImpl node, String srcWorkspaceName) throws javax.jcr.RepositoryException
node
- the node to updatesrcWorkspaceName
- the source workspace namejavax.jcr.RepositoryException
- if an error occursNode.update(String)
public javax.jcr.NodeIterator merge(String absPath, String srcWorkspace, boolean bestEffort) throws javax.jcr.RepositoryException
merge(String, String, boolean, boolean)
.merge
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public javax.jcr.NodeIterator merge(String absPath, String srcWorkspaceName, boolean bestEffort, boolean isShallow) throws javax.jcr.RepositoryException
merge
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public void doneMerge(String absPath, javax.jcr.version.Version version) throws javax.jcr.RepositoryException
doneMerge
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public void cancelMerge(String absPath, javax.jcr.version.Version version) throws javax.jcr.RepositoryException
cancelMerge
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public javax.jcr.Node createConfiguration(String absPath) throws javax.jcr.RepositoryException
createConfiguration
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public javax.jcr.Node setActivity(javax.jcr.Node activity) throws javax.jcr.RepositoryException
setActivity
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public javax.jcr.Node getActivity() throws javax.jcr.RepositoryException
getActivity
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public javax.jcr.Node createActivity(String title) throws javax.jcr.RepositoryException
createActivity
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public void removeActivity(javax.jcr.Node node) throws javax.jcr.RepositoryException
removeActivity
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
public javax.jcr.NodeIterator merge(javax.jcr.Node activityNode) throws javax.jcr.RepositoryException
merge
in interface javax.jcr.version.VersionManager
javax.jcr.RepositoryException
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.