Class ConditionType

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

@NonNullByDefault public class ConditionType extends ModuleType
This class provides common functionality for creating Condition instances by supplying their meta-information. Each ConditionType is uniquely identifiable in scope of the ModuleTypeRegistry and defines ConfigDescriptionParameters that are meta-information for configuration of the future Condition instances and meta-information for Inputs used from these Condition instances.
Author:
Yordan Mihaylov - Initial contribution, Ana Dimova - Initial contribution, Vasil Ilchev - Initial contribution
  • Constructor Details

    • ConditionType

      public ConditionType(@Nullable String uid, @Nullable List<ConfigDescriptionParameter> configDescriptions, @Nullable List<Input> inputs)
      Creates an instance of ConditionType with base properties - UID, a List of configuration descriptions and a List of Input descriptions.
      Parameters:
      uid - the ConditionType's identifier, or null if a random identifier should be generated.
      configDescriptions - describing meta-data for the configuration of the future Condition instances.
      inputs - a List with Input meta-information descriptions of the future Condition instances.
    • ConditionType

      public ConditionType(@Nullable String uid, @Nullable List<ConfigDescriptionParameter> configDescriptions, @Nullable String label, @Nullable String description, @Nullable Set<String> tags, @Nullable Visibility visibility, @Nullable List<Input> inputs)
      Creates an instance of ConditionType with uid, label, description, a Set of tags, visibility, a List of configuration descriptions and a List of Input descriptions.
      Parameters:
      uid - the ConditionType's identifier, or null if a random identifier should be generated.
      configDescriptions - describing meta-data for the configuration of the future Condition instances.
      label - a short and accurate, human-readable label of the ConditionType.
      description - a detailed, human-readable description of usage of ConditionType and its benefits.
      tags - defines categories that fit the ConditionType and which can serve as criteria for searching or filtering it.
      visibility - determines whether the ConditionType can be used by anyone if it is Visibility.VISIBLE or only by its creator if it is Visibility.HIDDEN.
      inputs - a List with Input meta-information descriptions of the future Condition instances.
  • Method Details

    • getInputs

      public List<Input> getInputs()
      Gets the meta-information descriptions of Inputs defined by this ConditionType.
      Returns:
      a List of Input meta-information descriptions.