Package org.openhab.core.thing.i18n
Class ChannelTypeI18nLocalizationService
java.lang.Object
org.openhab.core.thing.i18n.ChannelTypeI18nLocalizationService
This OSGi service could be used to localize a
ChannelType
using the I18N mechanism of the openHAB
framework.- Author:
- Markus Rathgeb - Initial contribution, Markus Rathgeb - Move code from XML thing type provider to separate service, Laurent Garnier - fix localized label and description for channel group definition, Christoph Weitkamp - factored out from
XmlChannelTypeProvider
andXmlChannelGroupTypeProvider
, Henning Treu - factored out fromThingTypeI18nLocalizationService
, Mark Herwege - added unit hint
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateLocalizedChannelType
(org.osgi.framework.Bundle bundle, ChannelType channelType, @Nullable Locale locale) @Nullable CommandDescription
createLocalizedCommandDescription
(org.osgi.framework.Bundle bundle, @Nullable CommandDescription command, ChannelTypeUID channelTypeUID, @Nullable Locale locale) createLocalizedCommandOptions
(org.osgi.framework.Bundle bundle, List<CommandOption> commandOptions, ChannelTypeUID channelTypeUID, @Nullable Locale locale) @Nullable StateDescriptionFragment
createLocalizedStateDescriptionFragment
(org.osgi.framework.Bundle bundle, @Nullable StateDescription state, ChannelTypeUID channelTypeUID, @Nullable Locale locale) createLocalizedStateOptions
(org.osgi.framework.Bundle bundle, List<StateOption> stateOptions, ChannelTypeUID channelTypeUID, @Nullable Locale locale) @Nullable String
createLocalizedStatePattern
(org.osgi.framework.Bundle bundle, String pattern, ChannelTypeUID channelTypeUID, @Nullable Locale locale)
-
Constructor Details
-
ChannelTypeI18nLocalizationService
-
-
Method Details
-
createLocalizedStatePattern
public @Nullable String createLocalizedStatePattern(org.osgi.framework.Bundle bundle, String pattern, ChannelTypeUID channelTypeUID, @Nullable Locale locale) -
createLocalizedStateOptions
public List<StateOption> createLocalizedStateOptions(org.osgi.framework.Bundle bundle, List<StateOption> stateOptions, ChannelTypeUID channelTypeUID, @Nullable Locale locale) -
createLocalizedStateDescriptionFragment
public @Nullable StateDescriptionFragment createLocalizedStateDescriptionFragment(org.osgi.framework.Bundle bundle, @Nullable StateDescription state, ChannelTypeUID channelTypeUID, @Nullable Locale locale) -
createLocalizedCommandOptions
public List<CommandOption> createLocalizedCommandOptions(org.osgi.framework.Bundle bundle, List<CommandOption> commandOptions, ChannelTypeUID channelTypeUID, @Nullable Locale locale) -
createLocalizedCommandDescription
public @Nullable CommandDescription createLocalizedCommandDescription(org.osgi.framework.Bundle bundle, @Nullable CommandDescription command, ChannelTypeUID channelTypeUID, @Nullable Locale locale) -
createLocalizedChannelType
public ChannelType createLocalizedChannelType(org.osgi.framework.Bundle bundle, ChannelType channelType, @Nullable Locale locale)
-