Class SubtreeExcludingValidator
java.lang.Object
org.apache.jackrabbit.oak.spi.commit.DefaultValidator
org.apache.jackrabbit.oak.spi.commit.SubtreeExcludingValidator
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:
-
Field Summary
Fields inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultValidator
INSTANCE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSubtreeExcludingValidator(Validator validator, List<String> path) -
Method Summary
Modifier and TypeMethodDescriptionchildNodeAdded(String name, NodeState after) Validate an added nodechildNodeChanged(String name, NodeState before, NodeState after) Validate a changed nodechildNodeDeleted(String name, NodeState before) Validate a deleted nodeprotected SubtreeExcludingValidatorcreateValidator(Validator validator, List<String> path) voidpropertyAdded(org.apache.jackrabbit.oak.api.PropertyState after) Validate an added propertyvoidpropertyChanged(org.apache.jackrabbit.oak.api.PropertyState before, org.apache.jackrabbit.oak.api.PropertyState after) Validate a changed propertyvoidpropertyDeleted(org.apache.jackrabbit.oak.api.PropertyState before) Validate a deleted propertyMethods inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultValidator
enter, leave
-
Constructor Details
-
SubtreeExcludingValidator
-
-
Method Details
-
propertyAdded
public void propertyAdded(org.apache.jackrabbit.oak.api.PropertyState after) throws org.apache.jackrabbit.oak.api.CommitFailedException Description copied from interface:ValidatorValidate an added property- Specified by:
propertyAddedin interfaceEditor- Specified by:
propertyAddedin interfaceValidator- Overrides:
propertyAddedin classDefaultValidator- 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:ValidatorValidate a changed property- Specified by:
propertyChangedin interfaceEditor- Specified by:
propertyChangedin interfaceValidator- Overrides:
propertyChangedin classDefaultValidator- Parameters:
before- the original propertyafter- 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:ValidatorValidate a deleted property- Specified by:
propertyDeletedin interfaceEditor- Specified by:
propertyDeletedin interfaceValidator- Overrides:
propertyDeletedin classDefaultValidator- 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: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. - 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: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. - 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: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 - Throws:
org.apache.jackrabbit.oak.api.CommitFailedException- if validation fails.
-
createValidator
-