Class VersionHook
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.version.VersionHook
-
- All Implemented Interfaces:
CommitHook
public class VersionHook extends java.lang.Object implements 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 Constructor Description VersionHook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull NodeStateprocessCommit(NodeState before, NodeState after, CommitInfo info)Validates and/or modifies the given content change before it gets persisted.
-
-
-
Method Detail
-
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
-
-