Class ThingTypeRegistry

    • Constructor Detail

    • Method Detail

      • getThingTypes

        public List<ThingType> getThingTypes​(@Nullable Locale locale)
        Returns all thing types.
        Parameters:
        locale - locale (can be null)
        Returns:
        all thing types
      • getThingTypes

        public List<ThingType> getThingTypes()
        Returns all thing types.
        Returns:
        all thing types
      • getThingTypes

        public List<ThingType> getThingTypes​(String bindingId,
                                             @Nullable Locale locale)
        Returns thing types for a given binding id.
        Parameters:
        bindingId - binding id
        locale - locale (can be null)
        Returns:
        thing types for given binding id
      • getThingTypes

        public List<ThingType> getThingTypes​(String bindingId)
        Returns thing types for a given binding id.
        Parameters:
        bindingId - binding id
        Returns:
        thing types for given binding id
      • getThingType

        public @Nullable ThingType getThingType​(ThingTypeUID thingTypeUID,
                                                @Nullable Locale locale)
        Returns a thing type for a given thing type UID.
        Parameters:
        thingTypeUID - thing type UID
        locale - locale (can be null)
        Returns:
        thing type for given UID or null if no thing type with this UID was found
      • getThingType

        public @Nullable ThingType getThingType​(ThingTypeUID thingTypeUID)
        Returns a thing type for a given thing type UID.
        Parameters:
        thingTypeUID - thing type UID
        Returns:
        thing type for given UID or null if no thing type with this UID was found
      • getChannelType

        public @Nullable ChannelType getChannelType​(Channel channel)
        Returns the channel type for a given channel.

        Attention: If you iterate over multiple channels to find the according channel types, please fetch the thing type first using getThingType(ThingTypeUID) and use ThingType#getChannelType(ChannelUID) afterwards.

        Parameters:
        channel - channel
        Returns:
        channel type or null if no channel type was found
      • getChannelType

        public @Nullable ChannelType getChannelType​(Channel channel,
                                                    @Nullable Locale locale)
        Returns the channel type for a given channel and locale.

        Attention: If you iterate over multiple channels to find the according channel types, please fetch the thing type first using getThingType(ThingTypeUID) and use ThingType#getChannelType(ChannelUID) afterwards.

        Parameters:
        channel - channel
        locale - locale (can be null)
        Returns:
        channel type or null if no channel type was found
      • addThingTypeProvider

        protected void addThingTypeProvider​(ThingTypeProvider thingTypeProvider)
      • removeThingTypeProvider

        protected void removeThingTypeProvider​(ThingTypeProvider thingTypeProvider)