Class OutputFormatFragment
java.lang.Object
io.aiven.kafka.connect.common.config.ConfigFragment
io.aiven.kafka.connect.common.config.OutputFormatFragment
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The setter for OutputFormatFragment. -
Field Summary
Fields inherited from class io.aiven.kafka.connect.common.config.ConfigFragment
cfg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the envelope enabled state.Gets the defined format type.Gets the output field encoding type.Returns a list of OutputField objects as specified byFORMAT_OUTPUT_FIELDS_CONFIG
.getOutputFields
(String configEntry) Returns a list of OutputField objects as specified by theconfigEntry
param.boolean
Returnstrue
ifFORMAT_OUTPUT_FIELDS_CONFIG
is set.static OutputFormatFragment.Setter
Creates a setter for this fragmentstatic org.apache.kafka.common.config.ConfigDef
update
(org.apache.kafka.common.config.ConfigDef configDef, OutputFieldType defaultFieldType) Defines the parameters for the OutputFormatFragment.void
validate()
Validate that the data in the configuration matches any restrictions.Methods inherited from class io.aiven.kafka.connect.common.config.ConfigFragment
has, logDeprecated, logDeprecated, logDeprecated
-
Constructor Details
-
OutputFormatFragment
public OutputFormatFragment(org.apache.kafka.common.config.AbstractConfig cfg)
-
-
Method Details
-
update
public static org.apache.kafka.common.config.ConfigDef update(org.apache.kafka.common.config.ConfigDef configDef, OutputFieldType defaultFieldType) Defines the parameters for the OutputFormatFragment.- Parameters:
configDef
- the configuration definition to update.defaultFieldType
- the default FieldType. May benull
.- Returns:
- The update ConfigDef.
-
setter
Creates a setter for this fragment- Parameters:
data
- the data to update- Returns:
- the Setter.
-
validate
public void validate()Description copied from class:ConfigFragment
Validate that the data in the configuration matches any restrictions. Default implementation does nothing.- Overrides:
validate
in classConfigFragment
-
getFormatType
Gets the defined format type.- Returns:
- the FormatType.
-
envelopeEnabled
Gets the envelope enabled state.- Returns:
- the envelope enabled state.
-
getOutputFieldEncodingType
Gets the output field encoding type.- Returns:
- the Output field encodging type.
-
getOutputFields
Returns a list of OutputField objects as specified byFORMAT_OUTPUT_FIELDS_CONFIG
.- Returns:
- a list of OutputField objects as specified by
FORMAT_OUTPUT_FIELDS_CONFIG
.
-
hasOutputFields
public boolean hasOutputFields()Returnstrue
ifFORMAT_OUTPUT_FIELDS_CONFIG
is set.- Returns:
true
ifFORMAT_OUTPUT_FIELDS_CONFIG
is set.
-
getOutputFields
Returns a list of OutputField objects as specified by theconfigEntry
param. May throw a ConfigException if the configEntry is not present in the configuraiton.- Parameters:
configEntry
- the configuration property that specifies the output field formats.- Returns:
- a list of OutputField objects as specified by
configEntry
.
-