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 ValidatorchildNodeAdded(java.lang.String name, NodeState after)Validate an added node@Nullable ValidatorchildNodeChanged(java.lang.String name, NodeState before, NodeState after)Validate a changed node@Nullable ValidatorchildNodeDeleted(java.lang.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 Detail
-
propertyAdded
void propertyAdded(PropertyState after) throws CommitFailedException
Validate an added property- Specified by:
propertyAddedin 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:
propertyChangedin 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:
propertyDeletedin 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:
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(java.lang.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(java.lang.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.
-
-