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

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ConfigValidation.BooleanValidator`
    `static class` | `ConfigValidation.ClusterMetricRegistryValidator`
    `static class` | `ConfigValidation.CustomIsExactlyOneOfValidators`
    `static class` | `ConfigValidation.DerivedTypeValidator` Checks if the named type derives from the specified Class.
    `static class` | `ConfigValidation.DoubleValidator`
    `static class` | `ConfigValidation.EventLoggerRegistryValidator`
    `static class` | `ConfigValidation.ImpersonationAclUserEntryValidator` Validates an entry for ImpersonationAclUser.
    `static class` | `ConfigValidation.ImplementsClassValidator`
    `static class` | `ConfigValidation.IntegerValidator` Validates a Integer.
    `static class` | `ConfigValidation.KryoRegValidator` Validates Kryo Registration.
    `static class` | `ConfigValidation.ListEntryCustomValidator` Validates each entry in a list against a list of custom Validators.
    `static class` | `ConfigValidation.ListEntryTypeValidator` Validates each entry in a list.
    `static class` | `ConfigValidation.ListOfListOfStringValidator` Validates a list of a list of Strings.
    `static class` | `ConfigValidation.MapEntryCustomValidator` validates each key and each value against the respective arrays of validators.
    `static class` | `ConfigValidation.MapEntryTypeValidator` validates each key and value in a map of a certain type.
    `static class` | `ConfigValidation.MapOfStringToMapOfStringToObjectValidator`
    `static class` | `ConfigValidation.MetricRegistryValidator`
    `static class` | `ConfigValidation.MetricReportersValidator`
    `static class` | `ConfigValidation.NoDuplicateInListValidator` validates a list of has no duplicates.
    `static class` | `ConfigValidation.NotNullValidator` Validates if an object is not null.
    `static class` | `ConfigValidation.NumberValidator`
    `static class` | `ConfigValidation.PacemakerAuthTypeValidator`
    `static class` | `ConfigValidation.PositiveNumberValidator` Validates a positive number.
    `static class` | `ConfigValidation.PowerOf2Validator` Validates if a number is a power of 2.
    `static class` | `ConfigValidation.RasConstraintsTypeValidator`
    `static class` | `ConfigValidation.SimpleTypeValidator` Validates basic types.
    `static class` | `ConfigValidation.StringOrStringListValidator` Validates a String or a list of Strings.
    `static class` | `ConfigValidation.StringValidator`
    `static class` | `ConfigValidation.UserResourcePoolEntryValidator`
    `static class` | `ConfigValidation.Validator`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigValidation()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and 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 class
    `static 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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConfigValidation

          public ConfigValidation()

  - ### Method Detail

    - #### getConfigClasses

          public static List<Class<?>> getConfigClasses()

    - #### 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 string
        `conf` - 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 string
        `conf` - map of confs
        `configs` - 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 validated
        `conf` - 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 configs
        `classes` - config class

    - #### isFieldAllowed

          public static boolean isFieldAllowed(Field field)

Copyright © 2021 The Apache Software Foundation. All rights reserved.