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) |
public ReadWriteVersionManager(@NotNull @NotNull SessionDelegate sessionDelegate)
protected void refresh() throws javax.jcr.RepositoryException
javax.jcr.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 javax.jcr.RepositoryException, javax.jcr.InvalidItemStateException, javax.jcr.UnsupportedRepositoryOperationException
versionable
- the versionable node to check in.javax.jcr.InvalidItemStateException
- if the current root has pending
changes.javax.jcr.UnsupportedRepositoryOperationException
- if the versionable tree isn't actually
versionable.javax.jcr.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 javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.InvalidItemStateException, javax.jcr.RepositoryException
workspaceRoot
- a fresh workspace root without pending changes.versionablePath
- the absolute path to the versionable node to check out.javax.jcr.UnsupportedRepositoryOperationException
- if the versionable tree isn't actually
versionable.javax.jcr.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.javax.jcr.InvalidItemStateException
public void addVersionLabel(@NotNull @NotNull VersionStorage versionStorage, @NotNull @NotNull String versionHistoryOakRelPath, @NotNull @NotNull String versionIdentifier, @NotNull @NotNull String oakVersionLabel, boolean moveLabel) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void removeVersionLabel(@NotNull @NotNull VersionStorage versionStorage, @NotNull @NotNull String versionHistoryOakRelPath, @NotNull @NotNull String oakVersionLabel) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void removeVersion(@NotNull @NotNull VersionStorage versionStorage, @NotNull @NotNull String versionHistoryOakRelPath, @NotNull @NotNull String oakVersionName) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.