Class ModuleType

java.lang.Object
org.openhab.core.automation.type.ModuleType
All Implemented Interfaces:
Identifiable<String>
Direct Known Subclasses:
ActionType, ConditionType, TriggerType

@NonNullByDefault public abstract class ModuleType extends Object implements Identifiable<String>
This class provides common functionality for creating ModuleType instances. Each ModuleType instance defines the meta-information needed for creation of a Module instance which is a building block for a Rule. The meta-information describes the Configuration of a Module providing list with ConfigDescriptionParameters, Inputs and Outputs of a Module. Each ModuleType instance owns a unique id which is used as reference in the Modules, to find their meta-information.

Whether the ModuleTypes can be used by anyone, depends from their Visibility value, but they can be modified only by their creator.

Author:
Yordan Mihaylov - Initial contribution, Ana Dimova - Initial contribution
  • Field Details

  • Constructor Details

    • ModuleType

      public ModuleType(@Nullable String uid, @Nullable List<ConfigDescriptionParameter> configDescriptions)
      Creates a ModuleType instance. This constructor is responsible to initialize common base properties of the ModuleTypes.
      Parameters:
      uid - the ModuleType's identifier, or null if a random identifier should be generated.
      configDescriptions - describing meta-data for the configuration of the future Module instances
    • ModuleType

      public ModuleType(@Nullable String uid, @Nullable List<ConfigDescriptionParameter> configDescriptions, @Nullable String label, @Nullable String description, @Nullable Set<String> tags, @Nullable Visibility visibility)
      Creates a ModuleType instance. This constructor is responsible to initialize all common properties of the ModuleTypes.
      Parameters:
      uid - the ModuleType's identifier, or null if a random identifier should be generated.
      configDescriptions - describing meta-data for the configuration of the future Module instances.
      label - a short and accurate, human-readable label of the ModuleType.
      description - a detailed, human-readable description of usage of ModuleType and its benefits.
      tags - defines categories that fit the ModuleType and which can serve as criteria for searching or filtering it.
      visibility - determines whether the ModuleType can be used by anyone if it is Visibility.VISIBLE or only by its creator if it is Visibility.HIDDEN. If null is provided the default visibility Visibility.VISIBLE will be used.
  • Method Details