public class ReadWriteVersionManager extends ReadOnlyVersionManager
ReadOnlyVersionManager with methods to modify the
version store.| Constructor and Description |
|---|
ReadWriteVersionManager(NodeBuilder versionStorageNode,
NodeBuilder workspaceRoot) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkin(@NotNull NodeBuilder versionable) |
void |
checkout(NodeBuilder versionable) |
@NotNull NodeBuilder |
getOrCreateVersionHistory(@NotNull NodeBuilder versionable,
@NotNull java.util.Map<java.lang.String,java.lang.Object> infoMap)
Gets or creates the version history for the given
versionable node. |
void |
removeVersionLabel(@NotNull java.lang.String historyRelPath,
@NotNull java.lang.String label)
Removes a version label from the jcr:versionLabels node of the referenced
version history.
|
void |
restore(@NotNull NodeBuilder versionable,
@NotNull java.lang.String versionUUID,
@Nullable org.apache.jackrabbit.oak.plugins.version.VersionSelector selector) |
getBaseVersion, getInstance, getVersion, getVersionable, getVersionHistory, getVersionHistoryPath, isCheckedOut, isVersionStoreTreepublic ReadWriteVersionManager(NodeBuilder versionStorageNode, NodeBuilder workspaceRoot)
@NotNull public @NotNull NodeBuilder getOrCreateVersionHistory(@NotNull @NotNull NodeBuilder versionable, @NotNull @NotNull java.util.Map<java.lang.String,java.lang.Object> infoMap)
versionable node.versionable - the versionable node.infoMap - The additional information as provided by CommitInfo.getInfo()java.lang.IllegalArgumentException - if the given node does not have a
jcr:uuid property.public void checkout(NodeBuilder versionable)
public void checkin(@NotNull
@NotNull NodeBuilder versionable)
throws CommitFailedException
CommitFailedExceptionpublic void restore(@NotNull
@NotNull NodeBuilder versionable,
@NotNull
@NotNull java.lang.String versionUUID,
@Nullable
@Nullable org.apache.jackrabbit.oak.plugins.version.VersionSelector selector)
throws CommitFailedException
CommitFailedExceptionpublic void removeVersionLabel(@NotNull
@NotNull java.lang.String historyRelPath,
@NotNull
@NotNull java.lang.String label)
throws CommitFailedException
historyRelPath - relative path from the jcr:versionStorage node to
the version history node.label - the version label.CommitFailedException - if there is no such version history or if
there is no label with the given name.Copyright © 2010 - 2023 Adobe. All Rights Reserved