Package org.openhab.core.automation.type
Interface ModuleTypeProvider
- All Superinterfaces:
Provider<ModuleType>
- All Known Implementing Classes:
AnnotatedThingActionModuleTypeProvider
This interface has to be implemented by all providers of
ModuleTypes.
The ModuleTypeRegistry uses it to get access to available ModuleTypes.- Author:
- Yordan Mihaylov - Initial contribution, Kai Kreuzer - refactored (managed) provider and registry implementation, Ana Dimova - add registration property - module.types
-
Method Summary
Modifier and TypeMethodDescription<T extends ModuleType>
@Nullable TgetModuleType(String uid, @Nullable Locale locale) Gets the localizedModuleTypedefined by this provider.<T extends ModuleType>
Collection<T> getModuleTypes(@Nullable Locale locale) Gets the localizedModuleTypes defined by this provider.Methods inherited from interface org.openhab.core.common.registry.Provider
addProviderChangeListener, getAll, removeProviderChangeListener
-
Method Details
-
getModuleType
Gets the localizedModuleTypedefined by this provider. When the localization is not specified or it is not supported aModuleTypewith default locale is returned.- Type Parameters:
T- the type of the required object.- Parameters:
uid- unique identifier of theModuleType.locale- defines localization of label and description of theModuleTypeor null.- Returns:
- localized module type.
-
getModuleTypes
Gets the localizedModuleTypes defined by this provider. When localization is not specified or it is not supported theModuleTypes with default localization is returned.- Type Parameters:
T- the type of the required object.- Parameters:
locale- defines localization of label and description of theModuleTypes or null.- Returns:
- collection of localized
ModuleTypeprovided by this provider.
-