Class CompositeHook

java.lang.Object
org.apache.jackrabbit.oak.spi.commit.CompositeHook
All Implemented Interfaces:
CommitHook

public class CompositeHook extends Object implements CommitHook
Composite commit hook. Maintains a list of component hooks and takes care of calling them in proper sequence.
  • Constructor Details

    • CompositeHook

      public CompositeHook(CommitHook... hooks)
  • Method Details

    • compose

      public static CommitHook compose(@NotNull @NotNull Collection<CommitHook> hooks)
    • processCommit

      @NotNull public @NotNull NodeState processCommit(NodeState before, NodeState after, CommitInfo info) throws org.apache.jackrabbit.oak.api.CommitFailedException
      Description copied from interface: CommitHook
      Validates and/or modifies the given content change before it gets persisted.
      Specified by:
      processCommit in interface CommitHook
      Parameters:
      before - content tree before the commit
      after - content tree prepared for the commit
      info - metadata associated with this commit
      Returns:
      content tree to be committed
      Throws:
      org.apache.jackrabbit.oak.api.CommitFailedException - if the commit should be rejected