Class SubtreeExcludingValidator
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.commit.DefaultValidator
-
- org.apache.jackrabbit.oak.spi.commit.SubtreeExcludingValidator
-
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:
SubtreeValidator
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultValidator
INSTANCE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SubtreeExcludingValidator(Validator validator, List<String> path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Validator
childNodeAdded(String name, NodeState after)
Validate an added nodeValidator
childNodeChanged(String name, NodeState before, NodeState after)
Validate a changed nodeValidator
childNodeDeleted(String name, NodeState before)
Validate a deleted nodeprotected SubtreeExcludingValidator
createValidator(Validator validator, List<String> path)
void
propertyAdded(PropertyState after)
Validate an added propertyvoid
propertyChanged(PropertyState before, PropertyState after)
Validate a changed propertyvoid
propertyDeleted(PropertyState before)
Validate a deleted property-
Methods inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultValidator
enter, leave
-
-
-
-
Method Detail
-
propertyAdded
public void propertyAdded(PropertyState after) throws CommitFailedException
Description copied from interface:Validator
Validate an added property- Specified by:
propertyAdded
in interfaceEditor
- Specified by:
propertyAdded
in interfaceValidator
- Overrides:
propertyAdded
in classDefaultValidator
- Parameters:
after
- the added property- Throws:
CommitFailedException
- if validation fails.
-
propertyChanged
public void propertyChanged(PropertyState before, PropertyState after) throws CommitFailedException
Description copied from interface:Validator
Validate a changed property- Specified by:
propertyChanged
in interfaceEditor
- Specified by:
propertyChanged
in interfaceValidator
- Overrides:
propertyChanged
in classDefaultValidator
- Parameters:
before
- the original propertyafter
- the changed property- Throws:
CommitFailedException
- if validation fails.
-
propertyDeleted
public void propertyDeleted(PropertyState before) throws CommitFailedException
Description copied from interface:Validator
Validate a deleted property- Specified by:
propertyDeleted
in interfaceEditor
- Specified by:
propertyDeleted
in interfaceValidator
- Overrides:
propertyDeleted
in classDefaultValidator
- Parameters:
before
- the original property- Throws:
CommitFailedException
- if validation fails.
-
childNodeAdded
public Validator childNodeAdded(String name, NodeState after) throws CommitFailedException
Description copied from interface:Validator
Validate an added node- Specified by:
childNodeAdded
in interfaceEditor
- Specified by:
childNodeAdded
in interfaceValidator
- Overrides:
childNodeAdded
in classDefaultValidator
- Parameters:
name
- the name of the added nodeafter
- the added node- Returns:
- a
Validator
forafter
ornull
if validation should not decent into the subtree rooted atafter
. - Throws:
CommitFailedException
- if validation fails.
-
childNodeChanged
public Validator childNodeChanged(String name, NodeState before, NodeState after) throws CommitFailedException
Description copied from interface:Validator
Validate a changed node- Specified by:
childNodeChanged
in interfaceEditor
- Specified by:
childNodeChanged
in interfaceValidator
- Overrides:
childNodeChanged
in classDefaultValidator
- Parameters:
name
- the name of the changed nodebefore
- the original nodeafter
- the changed node- Returns:
- a
Validator
forafter
ornull
if validation should not decent into the subtree rooted atafter
. - Throws:
CommitFailedException
- if validation fails.
-
childNodeDeleted
public Validator childNodeDeleted(String name, NodeState before) throws CommitFailedException
Description copied from interface:Validator
Validate a deleted node- Specified by:
childNodeDeleted
in interfaceEditor
- Specified by:
childNodeDeleted
in interfaceValidator
- Overrides:
childNodeDeleted
in classDefaultValidator
- Parameters:
name
- The name of the deleted node.before
- the original node- Returns:
- a
Validator
for the removed subtree ornull
if validation should not decent into the subtree - Throws:
CommitFailedException
- if validation fails.
-
createValidator
protected SubtreeExcludingValidator createValidator(Validator validator, List<String> path)
-
-