public class ReadWriteVersionManager extends org.apache.jackrabbit.oak.plugins.version.ReadOnlyVersionManager
ReadWriteVersionManager...| Constructor and Description |
|---|
ReadWriteVersionManager(@NotNull SessionDelegate sessionDelegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
addVersionLabel(@NotNull VersionStorage versionStorage,
@NotNull String versionHistoryOakRelPath,
@NotNull String versionIdentifier,
@NotNull String oakVersionLabel,
boolean moveLabel) |
@NotNull org.apache.jackrabbit.oak.api.Tree |
checkin(@NotNull 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(@NotNull org.apache.jackrabbit.oak.api.Root workspaceRoot,
@NotNull String versionablePath)
Performs a checkout on a versionable tree.
|
protected @NotNull org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager |
getNodeTypeManager() |
protected @NotNull org.apache.jackrabbit.oak.api.Tree |
getVersionStorage() |
protected @NotNull 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(@NotNull VersionStorage versionStorage,
@NotNull String versionHistoryOakRelPath,
@NotNull String oakVersionName) |
void |
removeVersionLabel(@NotNull VersionStorage versionStorage,
@NotNull String versionHistoryOakRelPath,
@NotNull String oakVersionLabel) |
checkVersionable, getBaseVersion, getIdentifierManager, getInstance, getVersion, getVersionable, getVersionHistory, getVersionHistoryPath, isCheckedOut, isVersionable, isVersionStoreTreepublic ReadWriteVersionManager(@NotNull
@NotNull SessionDelegate sessionDelegate)
protected void refresh()
throws RepositoryException
RepositoryException - if the session could not be refreshed@NotNull protected @NotNull org.apache.jackrabbit.oak.api.Tree getVersionStorage()
getVersionStorage in class org.apache.jackrabbit.oak.plugins.version.ReadOnlyVersionManager@NotNull protected @NotNull org.apache.jackrabbit.oak.api.Root getWorkspaceRoot()
getWorkspaceRoot in class org.apache.jackrabbit.oak.plugins.version.ReadOnlyVersionManager@NotNull protected @NotNull org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager getNodeTypeManager()
getNodeTypeManager in class org.apache.jackrabbit.oak.plugins.version.ReadOnlyVersionManager@NotNull public @NotNull org.apache.jackrabbit.oak.api.Tree checkin(@NotNull @NotNull 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(@NotNull
@NotNull org.apache.jackrabbit.oak.api.Root workspaceRoot,
@NotNull
@NotNull 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.InvalidItemStateExceptionpublic void addVersionLabel(@NotNull
@NotNull VersionStorage versionStorage,
@NotNull
@NotNull String versionHistoryOakRelPath,
@NotNull
@NotNull String versionIdentifier,
@NotNull
@NotNull String oakVersionLabel,
boolean moveLabel)
throws RepositoryException
RepositoryExceptionpublic void removeVersionLabel(@NotNull
@NotNull VersionStorage versionStorage,
@NotNull
@NotNull String versionHistoryOakRelPath,
@NotNull
@NotNull String oakVersionLabel)
throws RepositoryException
RepositoryExceptionpublic void removeVersion(@NotNull
@NotNull VersionStorage versionStorage,
@NotNull
@NotNull String versionHistoryOakRelPath,
@NotNull
@NotNull String oakVersionName)
throws RepositoryException
RepositoryExceptionCopyright © 2012–2020 The Apache Software Foundation. All rights reserved.