public class ReadWriteVersionManager extends org.apache.jackrabbit.oak.plugins.version.ReadOnlyVersionManager
ReadWriteVersionManager
...Constructor and Description |
---|
ReadWriteVersionManager(SessionDelegate sessionDelegate) |
Modifier and Type | Method and Description |
---|---|
void |
addVersionLabel(VersionStorage versionStorage,
String versionHistoryOakRelPath,
String versionIdentifier,
String oakVersionLabel,
boolean moveLabel) |
org.apache.jackrabbit.oak.api.Tree |
checkin(org.apache.jackrabbit.oak.api.Tree versionable)
Performs a checkin on a versionable tree and returns the tree that
represents the created version.
|
void |
checkout(org.apache.jackrabbit.oak.api.Root workspaceRoot,
String versionablePath)
Performs a checkout on a versionable tree.
|
protected org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager |
getNodeTypeManager() |
protected org.apache.jackrabbit.oak.api.Tree |
getVersionStorage() |
protected org.apache.jackrabbit.oak.api.Root |
getWorkspaceRoot() |
protected void |
refresh()
Called by the write methods to refresh the state of the possible
session associated with this instance.
|
void |
removeVersion(VersionStorage versionStorage,
String versionHistoryOakRelPath,
String oakVersionName) |
void |
removeVersionLabel(VersionStorage versionStorage,
String versionHistoryOakRelPath,
String oakVersionLabel) |
checkVersionable, getBaseVersion, getIdentifierManager, getInstance, getVersion, getVersionable, getVersionHistory, getVersionHistoryPath, isCheckedOut, isVersionable, isVersionStoreTree
public ReadWriteVersionManager(@Nonnull SessionDelegate sessionDelegate)
protected void refresh() throws RepositoryException
RepositoryException
- if the session could not be refreshed@Nonnull protected org.apache.jackrabbit.oak.api.Tree getVersionStorage()
getVersionStorage
in class org.apache.jackrabbit.oak.plugins.version.ReadOnlyVersionManager
@Nonnull protected org.apache.jackrabbit.oak.api.Root getWorkspaceRoot()
getWorkspaceRoot
in class org.apache.jackrabbit.oak.plugins.version.ReadOnlyVersionManager
@Nonnull protected org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager getNodeTypeManager()
getNodeTypeManager
in class org.apache.jackrabbit.oak.plugins.version.ReadOnlyVersionManager
@Nonnull public org.apache.jackrabbit.oak.api.Tree checkin(@Nonnull org.apache.jackrabbit.oak.api.Tree versionable) throws RepositoryException, InvalidItemStateException, UnsupportedRepositoryOperationException
versionable
- the versionable node to check in.InvalidItemStateException
- if the current root has pending
changes.UnsupportedRepositoryOperationException
- if the versionable tree isn't actually
versionable.RepositoryException
- if an error occurs while checking the
node type of the tree.public void checkout(@Nonnull org.apache.jackrabbit.oak.api.Root workspaceRoot, @Nonnull String versionablePath) throws UnsupportedRepositoryOperationException, InvalidItemStateException, RepositoryException
workspaceRoot
- a fresh workspace root without pending changes.versionablePath
- the absolute path to the versionable node to check out.UnsupportedRepositoryOperationException
- if the versionable tree isn't actually
versionable.RepositoryException
- if an error occurs while checking the
node type of the tree.IllegalStateException
- if the workspaceRoot has pending changes.IllegalArgumentException
- if the versionablePath
is
not absolute.InvalidItemStateException
public void addVersionLabel(@Nonnull VersionStorage versionStorage, @Nonnull String versionHistoryOakRelPath, @Nonnull String versionIdentifier, @Nonnull String oakVersionLabel, boolean moveLabel) throws RepositoryException
RepositoryException
public void removeVersionLabel(@Nonnull VersionStorage versionStorage, @Nonnull String versionHistoryOakRelPath, @Nonnull String oakVersionLabel) throws RepositoryException
RepositoryException
public void removeVersion(@Nonnull VersionStorage versionStorage, @Nonnull String versionHistoryOakRelPath, @Nonnull String oakVersionName) throws RepositoryException
RepositoryException
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.