Class SubtreeExcludingValidator

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

public class SubtreeExcludingValidator extends DefaultValidator
Validator that excludes a subtree from the validation process and delegates validation of other changes to another given validator.
Since:
Oak 0.9
See Also:
  • Constructor Details

    • SubtreeExcludingValidator

      protected SubtreeExcludingValidator(Validator validator, List<String> path)
  • Method Details

    • propertyAdded

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

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

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

      public Validator 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 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 Validator 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 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 Validator 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 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.
    • createValidator

      protected SubtreeExcludingValidator createValidator(Validator validator, List<String> path)