Interface ChannelTypeBuilder<T extends ChannelTypeBuilder<T>>

All Known Subinterfaces:
StateChannelTypeBuilder, TriggerChannelTypeBuilder

@NonNullByDefault public interface ChannelTypeBuilder<@NonNull T extends ChannelTypeBuilder<@NonNull T>>
Interface for ChannelTypeBuilder.
Author:
Stefan Triller - Initial contribution
  • Method Details

    • isAdvanced

      T isAdvanced(boolean advanced)
      Specify whether this is an advanced channel, default is false
      Parameters:
      advanced - true if this is an advanced ChannelType
      Returns:
      this Builder
    • withDescription

      T withDescription(String description)
      Sets the Description for the ChannelType
      Parameters:
      description - StateDescription for the ChannelType
      Returns:
      this Builder
    • withCategory

      T withCategory(String category)
      Sets the Category for the ChannelType
      Parameters:
      category - Category for the ChannelType
      Returns:
      this Builder
    • withTag

      T withTag(String tag)
      Adds a tag to the ChannelType
      Parameters:
      tag - Tag to be added to the ChannelType
      Returns:
      this Builder
    • withTags

      T withTags(Collection<String> tags)
      Sets the StateDescription for the ChannelType
      Parameters:
      tags - Collection of tags to be added to the ChannelType
      Returns:
      this Builder
    • withConfigDescriptionURI

      T withConfigDescriptionURI(URI configDescriptionURI)
      Sets the ConfigDescriptionURI for the ChannelType
      Parameters:
      configDescriptionURI - URI that references the ConfigDescription of the ChannelType
      Returns:
      this Builder
    • build

      ChannelType build()
      Build the ChannelType with the given values
      Returns:
      the created ChannelType
    • state

      static StateChannelTypeBuilder state(ChannelTypeUID channelTypeUID, String label, String itemType)
      Create an instance of a ChannelTypeBuilder for ChannelTypes of type STATE
      Parameters:
      channelTypeUID - UID of the ChannelType
      label - Label for the ChannelType
      itemType - ItemType that can be linked to the ChannelType
      Returns:
      ChannelTypeBuilder for ChannelTypes of type STATE
    • trigger

      static TriggerChannelTypeBuilder trigger(ChannelTypeUID channelTypeUID, String label)
      Create an instance of a ChannelTypeBuilder for ChannelTypes of type TRIGGER
      Parameters:
      channelTypeUID - UID of the ChannelType
      label - Label for the ChannelType
      Returns:
      ChannelTypeBuilder for ChannelTypes of type TRIGGER