Interface Validator

All Superinterfaces:
Editor
All Known Subinterfaces:
MoveValidator
All Known Implementing Classes:
DefaultMoveValidator, DefaultValidator, FailingValidator, MoveDetector, SubtreeExcludingValidator, SubtreeValidator, VisibleValidator

public interface Validator extends Editor
Content change validator. An instance of this interface is used to validate changes against a specific NodeState.
See Also:
  • Method Details

    • propertyAdded

      void propertyAdded(org.apache.jackrabbit.oak.api.PropertyState after) throws org.apache.jackrabbit.oak.api.CommitFailedException
      Validate an added property
      Specified by:
      propertyAdded in interface Editor
      Parameters:
      after - the added property
      Throws:
      org.apache.jackrabbit.oak.api.CommitFailedException - if validation fails.
    • propertyChanged

      void propertyChanged(org.apache.jackrabbit.oak.api.PropertyState before, org.apache.jackrabbit.oak.api.PropertyState after) throws org.apache.jackrabbit.oak.api.CommitFailedException
      Validate a changed property
      Specified by:
      propertyChanged in interface Editor
      Parameters:
      before - the original property
      after - the changed property
      Throws:
      org.apache.jackrabbit.oak.api.CommitFailedException - if validation fails.
    • propertyDeleted

      void propertyDeleted(org.apache.jackrabbit.oak.api.PropertyState before) throws org.apache.jackrabbit.oak.api.CommitFailedException
      Validate a deleted property
      Specified by:
      propertyDeleted in interface Editor
      Parameters:
      before - the original property
      Throws:
      org.apache.jackrabbit.oak.api.CommitFailedException - if validation fails.
    • childNodeAdded

      @Nullable @Nullable Validator childNodeAdded(String name, NodeState after) throws org.apache.jackrabbit.oak.api.CommitFailedException
      Validate an added node
      Specified by:
      childNodeAdded in interface Editor
      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

      @Nullable @Nullable Validator childNodeChanged(String name, NodeState before, NodeState after) throws org.apache.jackrabbit.oak.api.CommitFailedException
      Validate a changed node
      Specified by:
      childNodeChanged in interface Editor
      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

      @Nullable @Nullable Validator childNodeDeleted(String name, NodeState before) throws org.apache.jackrabbit.oak.api.CommitFailedException
      Validate a deleted node
      Specified by:
      childNodeDeleted in interface Editor
      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.