Interface LookupDataAdapterConfiguration

All Known Implementing Classes:
CSVFileDataAdapter.Config, DnsLookupDataAdapter.Config, DSVHTTPDataAdapter.Config, FallbackAdapterConfig, HTTPJSONPathDataAdapter.Config, MaxmindDataAdapter.Config

public interface LookupDataAdapterConfiguration
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    default Optional<com.google.common.collect.Multimap<String,String>>
    Override this method to check for logical errors in the configuration, such as missing files, or invalid combinations of options.
    default Optional<com.google.common.collect.Multimap<String,String>>
    Same as validate() but providing access to additional services via the given context object.
  • Field Details

  • Method Details

    • type

      String type()
    • validate

      default Optional<com.google.common.collect.Multimap<String,String>> validate()

      Override this method to check for logical errors in the configuration, such as missing files, or invalid combinations of options. Prefer validation annotations for simple per-property validations rules, such as min/max values, non-empty strings etc.

      By default the configuration has no extra validation errors (i.e. the result of this method is Optional.empty().

      Returning failing validations here does not prevent saving the configuration!

      If your validation needs access to additional services, override validate(LookupDataAdapterValidationContext) instead.

      Returns:
      optionally map of property name to error messages
    • validate

      default Optional<com.google.common.collect.Multimap<String,String>> validate(LookupDataAdapterValidationContext validationContext)
      Same as validate() but providing access to additional services via the given context object.

      If you override this message, don't also override validate() as the calling code is not expected to call both methods.