Class DefaultMoveValidator

java.lang.Object
org.apache.jackrabbit.oak.spi.commit.DefaultValidator
org.apache.jackrabbit.oak.spi.commit.DefaultMoveValidator
All Implemented Interfaces:
Editor, Validator, MoveValidator

public class DefaultMoveValidator extends DefaultValidator implements MoveValidator
MoveValidator that does nothing by default and doesn't recurse into subtrees. Useful as a sentinel or as a base class for more complex validators.
See Also:
  • Constructor Details

    • DefaultMoveValidator

      public DefaultMoveValidator()
  • Method Details

    • move

      public void move(String name, String sourcePath, NodeState moved) throws org.apache.jackrabbit.oak.api.CommitFailedException
      Description copied from interface: MoveValidator
      Called when a moved node has been detected.
      Specified by:
      move in interface MoveValidator
      Parameters:
      name - name of the node after the move
      sourcePath - path of the node before the move
      moved - the node state moved here
      Throws:
      org.apache.jackrabbit.oak.api.CommitFailedException - if validation fails. remove
    • childNodeAdded

      public MoveValidator childNodeAdded(String name, NodeState after) throws org.apache.jackrabbit.oak.api.CommitFailedException
      Description copied from interface: Validator
      Validate an added node
      Specified by:
      childNodeAdded in interface Editor
      Specified by:
      childNodeAdded in interface MoveValidator
      Specified by:
      childNodeAdded in interface Validator
      Overrides:
      childNodeAdded in class DefaultValidator
      Parameters:
      name - the name of the added node
      after - the added node
      Returns:
      a Validator for after or null if validation should not decent into the subtree rooted at after.
      Throws:
      org.apache.jackrabbit.oak.api.CommitFailedException - if validation fails.
    • childNodeChanged

      public MoveValidator childNodeChanged(String name, NodeState before, NodeState after) throws org.apache.jackrabbit.oak.api.CommitFailedException
      Description copied from interface: Validator
      Validate a changed node
      Specified by:
      childNodeChanged in interface Editor
      Specified by:
      childNodeChanged in interface MoveValidator
      Specified by:
      childNodeChanged in interface Validator
      Overrides:
      childNodeChanged in class DefaultValidator
      Parameters:
      name - the name of the changed node
      before - the original node
      after - the changed node
      Returns:
      a Validator for after or null if validation should not decent into the subtree rooted at after.
      Throws:
      org.apache.jackrabbit.oak.api.CommitFailedException - if validation fails.
    • childNodeDeleted

      public MoveValidator childNodeDeleted(String name, NodeState before) throws org.apache.jackrabbit.oak.api.CommitFailedException
      Description copied from interface: Validator
      Validate a deleted node
      Specified by:
      childNodeDeleted in interface Editor
      Specified by:
      childNodeDeleted in interface MoveValidator
      Specified by:
      childNodeDeleted in interface Validator
      Overrides:
      childNodeDeleted in class DefaultValidator
      Parameters:
      name - The name of the deleted node.
      before - the original node
      Returns:
      a Validator for the removed subtree or null if validation should not decent into the subtree
      Throws:
      org.apache.jackrabbit.oak.api.CommitFailedException - if validation fails.