Class ActionType

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

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

    • ActionType

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

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

      public ActionType(@Nullable String uid, @Nullable List<ConfigDescriptionParameter> configDescriptions, @Nullable String label, @Nullable String description, @Nullable Set<String> tags, @Nullable Visibility visibility, @Nullable List<Input> inputs, @Nullable List<Output> outputs)
      Creates an instance of ActionType with uid, label, description, a Set of tags, visibility, a List of configuration descriptions, a List of Input descriptions and a List of Output descriptions.
      Parameters:
      uid - the ActionType's identifier, or null if a random identifier should be generated.
      configDescriptions - describing meta-data for the configuration of the future Action instances.
      label - is a short and accurate name of the ActionType.
      description - is a short and understandable description of which can be used the ActionType.
      tags - defines categories that fit the ActionType and which can serve as criteria for searching or filtering it.
      visibility - determines whether the ActionType 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 Action instances.
      outputs - a List with Output meta-information descriptions of the future Action instances.
  • Method Details

    • getInputs

      public List<Input> getInputs()
      Gets the meta-information descriptions of Inputs defined by this type.
      Returns:
      a List with Input definitions.
    • getOutputs

      public List<Output> getOutputs()
      Gets the meta-information descriptions of Outputs defined by this type.
      Returns:
      a List with Output definitions.