public class DefaultMoveValidator extends DefaultValidator implements 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.DefaultValidatorINSTANCE| Constructor and Description |
|---|
DefaultMoveValidator() |
| Modifier and Type | Method and Description |
|---|---|
MoveValidator |
childNodeAdded(String name,
NodeState after)
Validate an added node
|
MoveValidator |
childNodeChanged(String name,
NodeState before,
NodeState after)
Validate a changed node
|
MoveValidator |
childNodeDeleted(String name,
NodeState before)
Validate a deleted node
|
void |
move(String name,
String sourcePath,
NodeState moved)
Called when a moved node has been detected.
|
enter, leave, propertyAdded, propertyChanged, propertyDeletedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpropertyAdded, propertyChanged, propertyDeletedpublic void move(String name, String sourcePath, NodeState moved) throws org.apache.jackrabbit.oak.api.CommitFailedException
MoveValidatormove in interface MoveValidatorname - name of the node after the movesourcePath - path of the node before the movemoved - the node state moved hereorg.apache.jackrabbit.oak.api.CommitFailedException - if validation fails.
removepublic MoveValidator childNodeAdded(String name, NodeState after) throws org.apache.jackrabbit.oak.api.CommitFailedException
ValidatorchildNodeAdded in interface EditorchildNodeAdded in interface ValidatorchildNodeAdded in interface MoveValidatorchildNodeAdded in class DefaultValidatorname - the name of the added nodeafter - the added nodeValidator for after or null if validation
should not decent into the subtree rooted at after.org.apache.jackrabbit.oak.api.CommitFailedException - if validation fails.public MoveValidator childNodeChanged(String name, NodeState before, NodeState after) throws org.apache.jackrabbit.oak.api.CommitFailedException
ValidatorchildNodeChanged in interface EditorchildNodeChanged in interface ValidatorchildNodeChanged in interface MoveValidatorchildNodeChanged in class DefaultValidatorname - the name of the changed nodebefore - the original nodeafter - the changed nodeValidator for after or null if validation
should not decent into the subtree rooted at after.org.apache.jackrabbit.oak.api.CommitFailedException - if validation fails.public MoveValidator childNodeDeleted(String name, NodeState before) throws org.apache.jackrabbit.oak.api.CommitFailedException
ValidatorchildNodeDeleted in interface EditorchildNodeDeleted in interface ValidatorchildNodeDeleted in interface MoveValidatorchildNodeDeleted in class DefaultValidatorname - The name of the deleted node.before - the original nodeValidator for the removed subtree or
null if validation should not decent into the subtreeorg.apache.jackrabbit.oak.api.CommitFailedException - if validation fails.Copyright © 2012–2017 The Apache Software Foundation. All rights reserved.