Interface BindingConfigReader


@NonNullByDefault public interface BindingConfigReader
This interface must be implemented by services, which can parse the generic binding configuration string used in the GenericItemProvider.
Author:
Kai Kreuzer - Initial contribution
  • Method Details

    • getBindingType

      String getBindingType()
      This defines the type of binding this reader will process, e.g. "knx".
      Returns:
      the type of the binding
    • validateItemType

      void validateItemType(String itemType, String bindingConfig) throws BindingConfigParseException
      Validates if the type of item is valid for this binding.
      Parameters:
      itemType - the type of the item to validate
      bindingConfig - the config string which could be used to refine the validation
      Throws:
      BindingConfigParseException - if the item type is invalid for this binding
    • processBindingConfiguration

      void processBindingConfiguration(String context, String itemType, String itemName, String bindingConfig, Configuration configuration) throws BindingConfigParseException
      This method is called by the GenericItemProvider whenever it comes across a binding configuration string for an item.
      Parameters:
      context - a string of the context from where this item comes from. Usually the file name of the config file
      itemType - the item type for which the binding config is defined
      itemName - the item name for which the binding config is defined
      bindingConfig - the configuration string that must be processed
      Throws:
      BindingConfigParseException - if the configuration string is not valid
    • startConfigurationUpdate

      void startConfigurationUpdate(String context)
      Informs the reader that configurations will be processed for a given context. This is usually called if a config file is reloaded, so that the old values are removed, before the new ones are processed.
      Parameters:
      context - the context of the configurations that will be processed
    • stopConfigurationUpdate

      void stopConfigurationUpdate(String context)
      Informs the reader that configuration update is completed for a given context. This is usually called after a config file is reloaded, so that the reader can clean up afterwards.
      Parameters:
      context - the context of the configurations that were processed