Class SubtreeValidator
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.commit.DefaultValidator
-
- org.apache.jackrabbit.oak.spi.commit.SubtreeValidator
-
public class SubtreeValidator extends DefaultValidator
Validator that detects changes to a specified subtree and delegates the validation of such changes to another given validator.- Since:
- Oak 0.3
- See Also:
SubtreeExcludingValidator
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultValidator
INSTANCE
-
-
Constructor Summary
Constructors Constructor Description SubtreeValidator(Validator validator, java.lang.String... path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValidatorchildNodeAdded(java.lang.String name, NodeState after)Validate an added nodeValidatorchildNodeChanged(java.lang.String name, NodeState before, NodeState after)Validate a changed nodeValidatorchildNodeDeleted(java.lang.String name, NodeState before)Validate a deleted node-
Methods inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultValidator
enter, leave, propertyAdded, propertyChanged, propertyDeleted
-
-
-
-
Constructor Detail
-
SubtreeValidator
public SubtreeValidator(Validator validator, java.lang.String... path)
-
-
Method Detail
-
childNodeAdded
public Validator childNodeAdded(java.lang.String name, NodeState after)
Description copied from interface:ValidatorValidate an added node- Specified by:
childNodeAddedin interfaceEditor- Specified by:
childNodeAddedin interfaceValidator- Overrides:
childNodeAddedin classDefaultValidator- Parameters:
name- the name of the added nodeafter- the added node- Returns:
- a
Validatorforafterornullif validation should not decent into the subtree rooted atafter.
-
childNodeChanged
public Validator childNodeChanged(java.lang.String name, NodeState before, NodeState after)
Description copied from interface:ValidatorValidate a changed node- Specified by:
childNodeChangedin interfaceEditor- Specified by:
childNodeChangedin interfaceValidator- Overrides:
childNodeChangedin classDefaultValidator- Parameters:
name- the name of the changed nodebefore- the original nodeafter- the changed node- Returns:
- a
Validatorforafterornullif validation should not decent into the subtree rooted atafter.
-
childNodeDeleted
public Validator childNodeDeleted(java.lang.String name, NodeState before)
Description copied from interface:ValidatorValidate a deleted node- Specified by:
childNodeDeletedin interfaceEditor- Specified by:
childNodeDeletedin interfaceValidator- Overrides:
childNodeDeletedin classDefaultValidator- Parameters:
name- The name of the deleted node.before- the original node- Returns:
- a
Validatorfor the removed subtree ornullif validation should not decent into the subtree
-
-