Interface BindingConfigReader

  • All Known Implementing Classes:

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

      • getBindingType

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

        void validateItemType​(Item item,
                              String bindingConfig)
                       throws BindingConfigParseException
        Validates if the type of item is valid for this binding.
        item - the item whose type is validated
        bindingConfig - the config string which could be used to refine the validation
        BindingConfigParseException - if the type of item is invalid for this binding
      • processBindingConfiguration

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

        void removeConfigurations​(String context)
        Removes all configuration information 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.
        context - the context of the configurations that should be removed