Interface Validator
- All Superinterfaces:
Editor
- All Known Subinterfaces:
MoveValidator
- All Known Implementing Classes:
ConflictValidator,CrossMountReferenceValidator,DefaultMoveValidator,DefaultValidator,FailingValidator,MoveDetector,SubtreeExcludingValidator,SubtreeValidator,VisibleValidator
Content change validator. An instance of this interface is used to
validate changes against a specific
NodeState.- See Also:
-
Method Summary
Modifier and TypeMethodDescription@Nullable ValidatorchildNodeAdded(String name, NodeState after) Validate an added node@Nullable ValidatorchildNodeChanged(String name, NodeState before, NodeState after) Validate a changed node@Nullable ValidatorchildNodeDeleted(String name, NodeState before) Validate a deleted nodevoidpropertyAdded(PropertyState after) Validate an added propertyvoidpropertyChanged(PropertyState before, PropertyState after) Validate a changed propertyvoidpropertyDeleted(PropertyState before) Validate a deleted property
-
Method Details
-
propertyAdded
Validate an added property- Specified by:
propertyAddedin interfaceEditor- Parameters:
after- the added property- Throws:
CommitFailedException- if validation fails.
-
propertyChanged
Validate a changed property- Specified by:
propertyChangedin interfaceEditor- Parameters:
before- the original propertyafter- the changed property- Throws:
CommitFailedException- if validation fails.
-
propertyDeleted
Validate a deleted property- Specified by:
propertyDeletedin interfaceEditor- Parameters:
before- the original property- Throws:
CommitFailedException- if validation fails.
-
childNodeAdded
@Nullable @Nullable Validator childNodeAdded(String name, NodeState after) throws CommitFailedException Validate an added node- Specified by:
childNodeAddedin interfaceEditor- 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
@Nullable @Nullable Validator childNodeChanged(String name, NodeState before, NodeState after) throws CommitFailedException Validate a changed node- Specified by:
childNodeChangedin interfaceEditor- 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
@Nullable @Nullable Validator childNodeDeleted(String name, NodeState before) throws CommitFailedException Validate a deleted node- Specified by:
childNodeDeletedin interfaceEditor- 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.
-