Package io.debezium.config
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 Summary
Fields Modifier and Type Field Description private Set<String>literalsprivate StringliteralsStrprivate List<Object>validValues
-
Constructor Summary
Constructors Constructor Description EnumRecommender(Class<T> enumType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intvalidate(Configuration config, Field field, Field.ValidationOutput problems)Validate the supplied value for the field, and report any problems to the designated consumer.List<Object>validValues(Field field, Configuration config)Return a set of recommended (and valid) values for the field given the current configuration values.booleanvisible(Field field, Configuration config)Set the visibility of the field given the current configuration values.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.debezium.config.Field.Validator
and
-
-
-
-
Method Detail
-
validValues
public List<Object> validValues(Field field, Configuration config)
Description copied from interface:Field.RecommenderReturn a set of recommended (and valid) values for the field given the current configuration values.- Specified by:
validValuesin interfaceField.Recommender- Parameters:
field- the field for which the recommended values are to be found; may not be nullconfig- 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.RecommenderSet the visibility of the field given the current configuration values.- Specified by:
visiblein interfaceField.Recommender- Parameters:
field- the field; may not be nullconfig- the configuration; may not be null- Returns:
trueif the field is to be visible, orfalseotherwise
-
validate
public int validate(Configuration config, Field field, Field.ValidationOutput problems)
Description copied from interface:Field.ValidatorValidate the supplied value for the field, and report any problems to the designated consumer.- Specified by:
validatein interfaceField.Validator- Parameters:
config- the configuration containing the field to be validated; may not be nullfield- theFieldbeing validated; never nullproblems- 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
-
-