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.DefaultValidator
INSTANCE
Constructor and Description |
---|
DefaultMoveValidator() |
Modifier and Type | Method and Description |
---|---|
MoveValidator |
childNodeAdded(java.lang.String name,
NodeState after)
Validate an added node
|
MoveValidator |
childNodeChanged(java.lang.String name,
NodeState before,
NodeState after)
Validate a changed node
|
MoveValidator |
childNodeDeleted(java.lang.String name,
NodeState before)
Validate a deleted node
|
void |
move(java.lang.String name,
java.lang.String sourcePath,
NodeState moved)
Called when a moved node has been detected.
|
enter, leave, propertyAdded, propertyChanged, propertyDeleted
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
propertyAdded, propertyChanged, propertyDeleted
public void move(java.lang.String name, java.lang.String sourcePath, NodeState moved) throws CommitFailedException
MoveValidator
move
in interface MoveValidator
name
- name of the node after the movesourcePath
- path of the node before the movemoved
- the node state moved hereCommitFailedException
- if validation fails.
removepublic MoveValidator childNodeAdded(java.lang.String name, NodeState after) throws CommitFailedException
Validator
childNodeAdded
in interface Editor
childNodeAdded
in interface Validator
childNodeAdded
in interface MoveValidator
childNodeAdded
in class DefaultValidator
name
- the name of the added nodeafter
- the added nodeValidator
for after
or null
if validation
should not decent into the subtree rooted at after
.CommitFailedException
- if validation fails.public MoveValidator childNodeChanged(java.lang.String name, NodeState before, NodeState after) throws CommitFailedException
Validator
childNodeChanged
in interface Editor
childNodeChanged
in interface Validator
childNodeChanged
in interface MoveValidator
childNodeChanged
in class DefaultValidator
name
- 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
.CommitFailedException
- if validation fails.public MoveValidator childNodeDeleted(java.lang.String name, NodeState before) throws CommitFailedException
Validator
childNodeDeleted
in interface Editor
childNodeDeleted
in interface Validator
childNodeDeleted
in interface MoveValidator
childNodeDeleted
in class DefaultValidator
name
- The name of the deleted node.before
- the original nodeValidator
for the removed subtree or
null
if validation should not decent into the subtreeCommitFailedException
- if validation fails."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"