Interface NodeValidatorPlugin
- All Known Implementing Classes:
ConditionsTraitPlugin,MemberAndShapeTraitPlugin,TimestampValidationStrategy,UniqueItemsPlugin
public interface NodeValidatorPlugin
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classValidation context to pass to each NodeValidatorPlugin.static interface -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidapply(Shape shape, Node value, NodeValidatorPlugin.Context context, NodeValidatorPlugin.Emitter emitter) Applies the plugin to the given shape, node value, and model.voidapplyMatching(Shape shape, Node value, NodeValidatorPlugin.Context context, NodeValidatorPlugin.Emitter emitter) Applies the plugin to the given shape, node value, and model.static List<NodeValidatorPlugin>A filter expressing the shape types this plugin applies to.
-
Field Details
-
EMPTY_STRING_ARRAY
-
-
Method Details
-
shapeTypeFilter
ShapeTypeFilter shapeTypeFilter()A filter expressing the shape types this plugin applies to.- Returns:
- A
ShapeTypeFilterthat matches aShapeTypeif this plugin has an effect on shapes of that type.
-
apply
default void apply(Shape shape, Node value, NodeValidatorPlugin.Context context, NodeValidatorPlugin.Emitter emitter) Applies the plugin to the given shape, node value, and model.- Parameters:
shape- Shape being checked.value- Value being evaluated.context- Evaluation context.emitter- Consumer to notify of validation event locations and messages.
-
applyMatching
void applyMatching(Shape shape, Node value, NodeValidatorPlugin.Context context, NodeValidatorPlugin.Emitter emitter) Applies the plugin to the given shape, node value, and model. Requires the shape to match the shapeMatcher().- Parameters:
shape- Shape being checked.value- Value being evaluated.context- Evaluation context.emitter- Consumer to notify of validation event locations and messages.
-
getBuiltins
- Returns:
- Gets the built-in Node validation plugins.
-