Class Field.EnumRecommender<T extends Enum<T>>

java.lang.Object
io.debezium.config.Field.EnumRecommender<T>
All Implemented Interfaces:
Field.Recommender, Field.Validator
Enclosing class:
Field

public static class Field.EnumRecommender<T extends Enum<T>> extends Object implements Field.Recommender, Field.Validator
  • Field Details

    • validValues

      private final List<Object> validValues
    • literals

      private final Set<String> literals
    • literalsStr

      private final String literalsStr
  • Constructor Details

    • EnumRecommender

      public EnumRecommender(Class<T> enumType)
  • Method Details

    • validValues

      public List<Object> validValues(Field field, Configuration config)
      Description copied from interface: Field.Recommender
      Return a set of recommended (and valid) values for the field given the current configuration values.
      Specified by:
      validValues in interface Field.Recommender
      Parameters:
      field - the field for which the recommended values are to be found; may not be null
      config - the configuration; may not be null
      Returns:
      the list of valid values
    • visible

      public boolean visible(Field field, Configuration config)
      Description copied from interface: Field.Recommender
      Set the visibility of the field given the current configuration values.
      Specified by:
      visible in interface Field.Recommender
      Parameters:
      field - the field; may not be null
      config - the configuration; may not be null
      Returns:
      true if the field is to be visible, or false otherwise
    • validate

      public int validate(Configuration config, Field field, Field.ValidationOutput problems)
      Description copied from interface: Field.Validator
      Validate the supplied value for the field, and report any problems to the designated consumer.
      Specified by:
      validate in interface Field.Validator
      Parameters:
      config - the configuration containing the field to be validated; may not be null
      field - the Field being validated; never null
      problems - the consumer to be called with each problem; never null
      Returns:
      the number of problems that were found, or 0 if the value is valid