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
public class DefaultMoveValidator extends DefaultValidator implements MoveValidator
MoveValidatorthat 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:
 DefaultValidator
 
- 
- 
Field Summary
- 
Fields inherited from class org.apache.jackrabbit.oak.spi.commit.DefaultValidator
INSTANCE 
 - 
 
- 
Constructor Summary
Constructors Constructor Description DefaultMoveValidator() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MoveValidatorchildNodeAdded(java.lang.String name, NodeState after)Validate an added nodeMoveValidatorchildNodeChanged(java.lang.String name, NodeState before, NodeState after)Validate a changed nodeMoveValidatorchildNodeDeleted(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 class org.apache.jackrabbit.oak.spi.commit.DefaultValidator
enter, leave, propertyAdded, propertyChanged, propertyDeleted 
- 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface org.apache.jackrabbit.oak.spi.commit.Validator
propertyAdded, propertyChanged, propertyDeleted 
 - 
 
 - 
 
- 
- 
Method Detail
- 
move
public void move(java.lang.String name, java.lang.String sourcePath, NodeState moved) throws CommitFailedExceptionDescription 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:
 CommitFailedException- if validation fails. remove
 
- 
childNodeAdded
public 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 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:
 CommitFailedException- if validation fails.
 
- 
childNodeChanged
public 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 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:
 CommitFailedException- if validation fails.
 
- 
childNodeDeleted
public 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 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:
 CommitFailedException- if validation fails.
 
 - 
 
 -