Class CompositeHook
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.commit.CompositeHook
-
- All Implemented Interfaces:
CommitHook
public class CompositeHook extends java.lang.Object implements CommitHook
Composite commit hook. Maintains a list of component hooks and takes care of calling them in proper sequence.
-
-
Constructor Summary
Constructors Constructor Description CompositeHook(CommitHook... hooks)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CommitHookcompose(@NotNull java.util.Collection<CommitHook> hooks)@NotNull NodeStateprocessCommit(NodeState before, NodeState after, CommitInfo info)Validates and/or modifies the given content change before it gets persisted.
-
-
-
Constructor Detail
-
CompositeHook
public CompositeHook(CommitHook... hooks)
-
-
Method Detail
-
compose
public static CommitHook compose(@NotNull @NotNull java.util.Collection<CommitHook> hooks)
-
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
-
-