Package org.apache.storm.validation
Class ConfigValidationAnnotations
java.lang.Object
org.apache.storm.validation.ConfigValidationAnnotations
Note: every annotation interface must have method `validatorClass()` For every annotation there must validator class to do the validation
To add another annotation for config validation, add another annotation @interface class. Implement the corresponding validator logic in
a class in ConfigValidation. Make sure validateField method in ConfigValidation knows how to use the validator and which method
definition/parameters to pass in based on what fields are in the annotation. By default, params of annotations will be passed into a
constructor that takes a Map as a parameter.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
For custom validators.static @interface
static @interface
static @interface
Custom validator where exactly one of the validations must be successful.static @interface
static @interface
static @interface
static @interface
Validates each entry in a list with a list of validators Validators with fields: validatorClass and entryValidatorClass.static @interface
validates each entry in a list is of a certain type.static @interface
Validates a each key and value in a Map with a list of validators Validator with fields: validatorClass, keyValidatorClasses, valueValidatorClasses.static @interface
Validates the type of each key and value in a map Validator with fields: validatorClass, keyValidatorClass, valueValidatorClass.static @interface
Validates that there are no duplicates in a list.static @interface
static @interface
Checks if a number is positive and whether zero inclusive Validator with fields: validatorClass, includeZero.static @interface
static @interface
Validators with fields: validatorClass.static @interface
static @interface
Complex/custom type validators.static @interface
Validators with fields: validatorClass and type.static @interface
Validates on object is not null.static @interface
static class
Field names for annotations. -
Constructor Summary
-
Method Summary
-
Constructor Details
-
ConfigValidationAnnotations
public ConfigValidationAnnotations()
-