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
ModuleType
s.
The ModuleTypeRegistry
uses it to get access to available ModuleType
s.- 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 localizedModuleType
defined by this provider.<T extends ModuleType>
Collection<T> getModuleTypes
(@Nullable Locale locale) Gets the localizedModuleType
s defined by this provider.Methods inherited from interface org.openhab.core.common.registry.Provider
addProviderChangeListener, getAll, removeProviderChangeListener
-
Method Details
-
getModuleType
Gets the localizedModuleType
defined by this provider. When the localization is not specified or it is not supported aModuleType
with 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 theModuleType
or null.- Returns:
- localized module type.
-
getModuleTypes
Gets the localizedModuleType
s defined by this provider. When localization is not specified or it is not supported theModuleType
s with default localization is returned.- Type Parameters:
T
- the type of the required object.- Parameters:
locale
- defines localization of label and description of theModuleType
s or null.- Returns:
- collection of localized
ModuleType
provided by this provider.
-