Class OutputFormatFragment

java.lang.Object
io.aiven.kafka.connect.common.config.ConfigFragment
io.aiven.kafka.connect.common.config.OutputFormatFragment

public final class OutputFormatFragment extends ConfigFragment
  • 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 be null.
      Returns:
      The update ConfigDef.
    • 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 class ConfigFragment
    • getFormatType

      public FormatType getFormatType()
    • envelopeEnabled

      public Boolean envelopeEnabled()
    • getOutputFieldEncodingType

      public OutputFieldEncodingType getOutputFieldEncodingType()
    • getOutputFields

      public List<OutputField> getOutputFields()
      Returns a list of OutputField objects as specified by FORMAT_OUTPUT_FIELDS_CONFIG.
      Returns:
      a list of OutputField objects as specified by FORMAT_OUTPUT_FIELDS_CONFIG.
    • hasOutputFields

      public boolean hasOutputFields()
      Returns true if FORMAT_OUTPUT_FIELDS_CONFIG is set.
      Returns:
      true if FORMAT_OUTPUT_FIELDS_CONFIG is set.
    • getOutputFields

      public List<OutputField> getOutputFields(String configEntry)
      Returns a list of OutputField objects as specified by the configEntry 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.