Package org.apache.storm.validation
Class ConfigValidation
- java.lang.Object
-
- org.apache.storm.validation.ConfigValidation
-
public class ConfigValidation extends Object
Provides functionality for validating configuration fields.
-
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description ConfigValidation()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Class<?>>
getConfigClasses()
static boolean
isFieldAllowed(Field field)
static void
validateField(Field field, Map<String,Object> conf)
Validates a field given field.static void
validateField(String fieldName, Map<String,Object> conf)
Validates a field given field name as string uses Config.java as the default config classstatic void
validateField(String fieldName, Map<String,Object> conf, List<Class<?>> configs)
Validates a field given field name as string.static void
validateFields(Map<String,Object> conf)
Validate all confs in map.static void
validateFields(Map<String,Object> conf, List<Class<?>> classes)
Validate all confs in map.static void
validateTopoConf(Map<String,Object> topoConf)
Validate topology conf.
-
-
-
Method Detail
-
validateField
public static void validateField(String fieldName, Map<String,Object> conf)
Validates a field given field name as string uses Config.java as the default config class- Parameters:
fieldName
- provided as a stringconf
- map of confs
-
validateField
public static void validateField(String fieldName, Map<String,Object> conf, List<Class<?>> configs)
Validates a field given field name as string.- Parameters:
fieldName
- provided as a stringconf
- map of confsconfigs
- config class
-
validateField
public static void validateField(Field field, Map<String,Object> conf)
Validates a field given field. Calls correct ValidatorField method based on which fields are declared for the corresponding annotation.- Parameters:
field
- field that needs to be validatedconf
- map of confs
-
validateTopoConf
public static void validateTopoConf(Map<String,Object> topoConf)
Validate topology conf.- Parameters:
topoConf
- The topology conf.
-
validateFields
public static void validateFields(Map<String,Object> conf)
Validate all confs in map.- Parameters:
conf
- map of configs
-
validateFields
public static void validateFields(Map<String,Object> conf, List<Class<?>> classes)
Validate all confs in map.- Parameters:
conf
- map of configsclasses
- config class
-
isFieldAllowed
public static boolean isFieldAllowed(Field field)
-
-