Class SubtreeEditor

java.lang.Object
org.apache.jackrabbit.oak.spi.commit.DefaultEditor
org.apache.jackrabbit.oak.spi.commit.SubtreeEditor
All Implemented Interfaces:
Editor

public class SubtreeEditor extends DefaultEditor
Editor wrapper that passes only changes in the specified subtree to the given delegate editor.
Since:
Oak 0.7
  • Constructor Details

    • SubtreeEditor

      public SubtreeEditor(Editor editor, String... path)
  • Method Details

    • childNodeAdded

      @Nullable public @Nullable Editor childNodeAdded(String name, NodeState after)
      Description copied from interface: Editor
      Processes an added child node.
      Specified by:
      childNodeAdded in interface Editor
      Overrides:
      childNodeAdded in class DefaultEditor
      Parameters:
      name - name of the added node
      after - the added child node
      Returns:
      an editor for processing the subtree below the added node, or null if the subtree does not need processing
    • childNodeChanged

      @Nullable public @Nullable Editor childNodeChanged(String name, NodeState before, NodeState after)
      Description copied from interface: Editor
      Processes a changed child node. This method gets called for all child nodes that may contain changes between the before and after states.
      Specified by:
      childNodeChanged in interface Editor
      Overrides:
      childNodeChanged in class DefaultEditor
      Parameters:
      name - name of the changed node
      before - child node before the change
      after - child node after the change
      Returns:
      an editor for processing the subtree below the added node, or null if the subtree does not need processing
    • childNodeDeleted

      @Nullable public @Nullable Editor childNodeDeleted(String name, NodeState before)
      Description copied from interface: Editor
      Processes a deleted child node.
      Specified by:
      childNodeDeleted in interface Editor
      Overrides:
      childNodeDeleted in class DefaultEditor
      Parameters:
      name - name of the deleted node
      before - the deleted child node
      Returns:
      an editor for processing the subtree below the removed node, or null if the subtree does not need processing