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 MoveValidator
childNodeAdded(String name, NodeState after)
Validate an added node@Nullable MoveValidator
childNodeChanged(String name, NodeState before, NodeState after)
Validate a changed node@Nullable MoveValidator
childNodeDeleted(String name, NodeState before)
Validate a deleted nodevoid
move(String name, 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(String name, String sourcePath, NodeState moved) throws CommitFailedException
Called 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(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
- 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
@Nullable @Nullable MoveValidator 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
- 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
@Nullable @Nullable MoveValidator 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
- 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.
-
-