Class CompositeHook

  • All Implemented Interfaces:

    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 Detail

      • CompositeHook

        public CompositeHook​(CommitHook... hooks)
    • Method Detail

      • compose

        public static CommitHook compose​(@NotNull
                                         @NotNull java.util.Collection<CommitHook> hooks)
      • processCommit

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