Interface Module

All Known Subinterfaces:
Action, Condition, Trigger

@NonNullByDefault public interface Module
This interface represents automation Modules which are building components of the Rules.

Each module is identified by id, which is unique in scope of the Rule.

Each module has a ModuleType which provides meta data of the module. The meta data defines Inputs, Outputs and ConfigDescriptionParameters which are the building elements of the Module.
Setters of the module don't have immediate effect on the Rule. To apply the changes, the Module should be set on the Rule and the Rule has to be updated in RuleRegistry by invoking update method.

Author:
Yordan Mihaylov - Initial contribution, Kai Kreuzer - Initial contribution
  • Method Details

    • getId

      String getId()
      Gets the Module's unique identifier in the scope of the rule in which this module belongs. The identifier of the Module is used to identify it when other rule's module refers it as input.
      Returns:
      the Module's unique identifier in the scope of the rule in which this module belongs.
    • getTypeUID

      String getTypeUID()
      Gets the module type unique identifier which is a reference to the corresponding ModuleType that describes this module. The ModuleType contains Inputs, Outputs and ConfigDescriptionParameters of this module.
      Returns:
      the ModuleType unique identifier.
    • getLabel

      @Nullable String getLabel()
      Gets the label of the Module. The label is user understandable name of the Module.
      Returns:
      the label of the module or null if not specified.
    • getDescription

      @Nullable String getDescription()
      Gets the description of the Module. The description is a detailed, human understandable description of the Module.
      Returns:
      the detailed description of the module or null if not specified.
    • getConfiguration

      Configuration getConfiguration()
      Gets the configuration values of the Module.
      Returns:
      the current configuration values of the Module.