Class VersionablePathHook

  • All Implemented Interfaces:
    CommitHook

    public class VersionablePathHook
    extends java.lang.Object
    implements CommitHook
    Commit hook which is responsible for storing the path of the versionable node with every version history. This includes creating the path property for every workspace the version history is represented and updating the path upon moving around a versionable node.
    • Constructor Detail

      • VersionablePathHook

        public VersionablePathHook​(@NotNull
                                   @NotNull java.lang.String workspaceName,
                                   @NotNull
                                   @NotNull ProviderCtx providerCtx)
    • Method Detail

      • processCommit

        @NotNull
        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
        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:
        CommitFailedException - if the commit should be rejected
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object