Interface MoveValidator
-
- All Known Implementing Classes:
DefaultMoveValidator
public interface MoveValidator extends Validator
A validator that also receives notifications about moved nodes.- See Also:
MoveDetector
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable MoveValidatorchildNodeAdded(java.lang.String name, NodeState after)Validate an added node@Nullable MoveValidatorchildNodeChanged(java.lang.String name, NodeState before, NodeState after)Validate a changed node@Nullable MoveValidatorchildNodeDeleted(java.lang.String name, NodeState before)Validate a deleted nodevoidmove(java.lang.String name, java.lang.String sourcePath, NodeState moved)Called when a moved node has been detected.-
Methods inherited from interface org.apache.jackrabbit.oak.spi.commit.Validator
propertyAdded, propertyChanged, propertyDeleted
-
-
-
-
Method Detail
-
move
void move(java.lang.String name, java.lang.String sourcePath, NodeState moved) throws CommitFailedExceptionCalled when a moved node has been detected.- Parameters:
sourcePath- path of the node before the movename- name of the node after the movemoved- the node state moved here- Throws:
CommitFailedException- if validation fails. remove
-
childNodeAdded
@Nullable @Nullable MoveValidator childNodeAdded(java.lang.String name, NodeState after) throws CommitFailedException
Description copied from interface:ValidatorValidate an added node- Specified by:
childNodeAddedin interfaceEditor- Specified by:
childNodeAddedin interfaceValidator- Parameters:
name- the name of the added nodeafter- the added node- Returns:
- a
Validatorforafterornullif validation should not decent into the subtree rooted atafter. - Throws:
CommitFailedException- if validation fails.
-
childNodeChanged
@Nullable @Nullable MoveValidator childNodeChanged(java.lang.String name, NodeState before, NodeState after) throws CommitFailedException
Description copied from interface:ValidatorValidate a changed node- Specified by:
childNodeChangedin interfaceEditor- Specified by:
childNodeChangedin interfaceValidator- 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:
CommitFailedException- if validation fails.
-
childNodeDeleted
@Nullable @Nullable MoveValidator childNodeDeleted(java.lang.String name, NodeState before) throws CommitFailedException
Description copied from interface:ValidatorValidate a deleted node- Specified by:
childNodeDeletedin interfaceEditor- Specified by:
childNodeDeletedin interfaceValidator- 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:
CommitFailedException- if validation fails.
-
-