Class DefaultMoveValidator

    • Constructor Detail

      • DefaultMoveValidator

        public DefaultMoveValidator()
    • Method Detail

      • move

        public void move​(java.lang.String name,
                         java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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.