Class DefaultMoveValidator
java.lang.Object
org.apache.jackrabbit.oak.spi.commit.DefaultValidator
org.apache.jackrabbit.oak.spi.commit.DefaultMoveValidator
- All Implemented Interfaces:
Editor,Validator,MoveValidator
MoveValidator that does nothing by default and doesn't recurse into subtrees.
Useful as a sentinel or as a base class for more complex validators.- See Also:
-
Field Summary
Fields inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultValidator
INSTANCE -
Constructor Summary
Constructors -
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 nodevoidCalled when a moved node has been detected.Methods inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultValidator
enter, leave, propertyAdded, propertyChanged, propertyDeletedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jackrabbit.oak.spi.commit.Validator
propertyAdded, propertyChanged, propertyDeleted
-
Constructor Details
-
DefaultMoveValidator
public DefaultMoveValidator()
-
-
Method Details
-
move
public void move(String name, String sourcePath, NodeState moved) throws org.apache.jackrabbit.oak.api.CommitFailedException Description copied from interface:MoveValidatorCalled when a moved node has been detected.- Specified by:
movein interfaceMoveValidator- Parameters:
name- name of the node after the movesourcePath- path of the node before the movemoved- the node state moved here- Throws:
org.apache.jackrabbit.oak.api.CommitFailedException- if validation fails. remove
-
childNodeAdded
public MoveValidator 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 interfaceMoveValidator- 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 MoveValidator 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 interfaceMoveValidator- 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 MoveValidator 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 interfaceMoveValidator- 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.
-