Interface DynamicCommandDescriptionProvider

  • All Known Implementing Classes:
    BaseDynamicCommandDescriptionProvider

    @NonNullByDefault
    public interface DynamicCommandDescriptionProvider
    Implementations may provide channel specific CommandDescriptions. Therefore the provider must be registered as OSGi service.
    Author:
    Henning Treu - Initial contribution
    • Method Detail

      • getCommandDescription

        @Nullable CommandDescription getCommandDescription​(Channel channel,
                                                           @Nullable CommandDescription originalCommandDescription,
                                                           @Nullable Locale locale)
        For a given channel UID, return a CommandDescription that should be used for the channel, instead of the one defined statically in the ChannelType. For a particular channel, there should be only one provider of the dynamic command description. When more than one description is provided for the same channel (by different providers), only one will be used, from the provider that registered first.
        Parameters:
        channel - channel
        originalCommandDescription - original command description retrieved from the channel type this is the description to be replaced by the provided one
        locale - locale (can be null)
        Returns:
        command description or null if none provided