Class VersionHook
java.lang.Object
org.apache.jackrabbit.oak.plugins.version.VersionHook
- All Implemented Interfaces:
CommitHook
This class gathers together editors related to handling version storage:
-
VersionEditorProvider-
VersionEditor- creates version history, handles checking-in, checking-out and restoring, prevents a checked-in node from being modified, -
VersionStorageEditor- validates changes on the version storage,
-
-
VersionableCollector- collects all existing versionable UUIDs, so assigned histories won't be removed in the next step, -
OrphanedVersionCleaner- removes all histories that are empty and have no longer a parent versionable node.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull NodeStateprocessCommit(NodeState before, NodeState after, CommitInfo info) Validates and/or modifies the given content change before it gets persisted.
-
Constructor Details
-
VersionHook
public VersionHook()
-
-
Method Details
-
processCommit
@NotNull public @NotNull NodeState processCommit(NodeState before, NodeState after, CommitInfo info) throws CommitFailedException Description copied from interface:CommitHookValidates and/or modifies the given content change before it gets persisted.- Specified by:
processCommitin interfaceCommitHook- Parameters:
before- content tree before the commitafter- content tree prepared for the commitinfo- metadata associated with this commit- Returns:
- content tree to be committed
- Throws:
CommitFailedException- if the commit should be rejected
-