Class ChannelTypeRegistry

java.lang.Object
org.openhab.core.thing.type.ChannelTypeRegistry

@NonNullByDefault public class ChannelTypeRegistry extends Object
The ChannelTypeRegistry tracks all ChannelTypes provided by registered ChannelTypeProviders.
Author:
Dennis Nobel - Initial contribution
  • Constructor Details

    • ChannelTypeRegistry

      public ChannelTypeRegistry()
  • Method Details

    • getChannelTypes

      public List<ChannelType> getChannelTypes()
      Returns all channel types with the default Locale.
      Returns:
      all channel types or empty list if no channel type exists
    • getChannelTypes

      public List<ChannelType> getChannelTypes(@Nullable Locale locale)
      Returns all channel types for the given Locale.
      Parameters:
      locale - (can be null)
      Returns:
      all channel types or empty list if no channel type exists
    • getChannelType

      public @Nullable ChannelType getChannelType(@Nullable ChannelTypeUID channelTypeUID)
      Returns the channel type for the given UID with the default Locale.
      Returns:
      channel type or null if no channel type for the given UID exists
    • getChannelType

      public @Nullable ChannelType getChannelType(@Nullable ChannelTypeUID channelTypeUID, @Nullable Locale locale)
      Returns the channel type for the given UID and the given Locale.
      Parameters:
      locale - (can be null)
      Returns:
      channel type or null if no channel type for the given UID exists
    • addChannelTypeProvider

      protected void addChannelTypeProvider(ChannelTypeProvider channelTypeProviders)
    • removeChannelTypeProvider

      protected void removeChannelTypeProvider(ChannelTypeProvider channelTypeProviders)