Interface Validator
-
- All Superinterfaces:
Editor
- All Known Subinterfaces:
MoveValidator
- All Known Implementing Classes:
ConflictValidator
,CrossMountReferenceValidator
,DefaultMoveValidator
,DefaultValidator
,FailingValidator
,MoveDetector
,SubtreeExcludingValidator
,SubtreeValidator
,VisibleValidator
public interface Validator extends Editor
Content change validator. An instance of this interface is used to validate changes against a specificNodeState
.- See Also:
- Commit validators
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable Validator
childNodeAdded(java.lang.String name, NodeState after)
Validate an added node@Nullable Validator
childNodeChanged(java.lang.String name, NodeState before, NodeState after)
Validate a changed node@Nullable Validator
childNodeDeleted(java.lang.String name, NodeState before)
Validate a deleted nodevoid
propertyAdded(PropertyState after)
Validate an added propertyvoid
propertyChanged(PropertyState before, PropertyState after)
Validate a changed propertyvoid
propertyDeleted(PropertyState before)
Validate a deleted property
-
-
-
Method Detail
-
propertyAdded
void propertyAdded(PropertyState after) throws CommitFailedException
Validate an added property- Specified by:
propertyAdded
in interfaceEditor
- Parameters:
after
- the added property- Throws:
CommitFailedException
- if validation fails.
-
propertyChanged
void propertyChanged(PropertyState before, PropertyState after) throws CommitFailedException
Validate a changed property- Specified by:
propertyChanged
in interfaceEditor
- Parameters:
before
- the original propertyafter
- the changed property- Throws:
CommitFailedException
- if validation fails.
-
propertyDeleted
void propertyDeleted(PropertyState before) throws CommitFailedException
Validate a deleted property- Specified by:
propertyDeleted
in interfaceEditor
- Parameters:
before
- the original property- Throws:
CommitFailedException
- if validation fails.
-
childNodeAdded
@Nullable @Nullable Validator childNodeAdded(java.lang.String name, NodeState after) throws CommitFailedException
Validate an added node- Specified by:
childNodeAdded
in interfaceEditor
- 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 Validator childNodeChanged(java.lang.String name, NodeState before, NodeState after) throws CommitFailedException
Validate a changed node- Specified by:
childNodeChanged
in interfaceEditor
- 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 Validator childNodeDeleted(java.lang.String name, NodeState before) throws CommitFailedException
Validate a deleted node- Specified by:
childNodeDeleted
in interfaceEditor
- 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.
-
-