Package org.openhab.core.automation.type
Interface ModuleTypeRegistry
- All Superinterfaces:
Registry<ModuleType,
String>
This interface provides functionality to get available
ModuleType
s. The module types can be returned
localized depending on locale parameter. When it is not specified or there is no such localization resources the
returned module type is localized with default locale.- Author:
- Yordan Mihaylov - Initial contribution, Ana Dimova - Initial contribution, Vasil Ilchev - Initial contribution
-
Method Summary
Modifier and TypeMethodDescription<T extends ModuleType>
@Nullable TGets the localizedModuleType
by specified UID and locale.getActions
(@Nullable Locale locale, String... tags) This method is used for getting theActionType
s, localized depending on passed locale parameter.getActions
(String... tags) This method is used for getting theActionType
s.<T extends ModuleType>
Collection<T>Gets theModuleType
s filtered by tag.<T extends ModuleType>
Collection<T>This method is used for getting theModuleType
s filtered by tag.<T extends ModuleType>
Collection<T>This method is used for getting theModuleType
s filtered by tags.<T extends ModuleType>
Collection<T>This method is used for getting theModuleType
s filtered by tags.getConditions
(@Nullable Locale locale, String... tags) This method is used for getting theConditionType
s, localized depending on passed locale parameter.getConditions
(String... tags) This method is used for getting theConditionType
s.getTriggers
(@Nullable Locale locale, String... tags) This method is used for getting theTriggerType
s, localized depending on passed locale parameter.getTriggers
(String... tags) This method is used for getting theTriggerType
s.Methods inherited from interface org.openhab.core.common.registry.Registry
add, addRegistryChangeListener, get, getAll, remove, removeRegistryChangeListener, stream, update
-
Method Details
-
get
Gets the localizedModuleType
by specified UID and locale.- Type Parameters:
T
- the type of the required object.- Parameters:
moduleTypeUID
- the a unique id in scope of registeredModuleType
s.locale
- used for localization of theModuleType
.- Returns:
- the desired
ModuleType
instance ornull
if a module type with such UID does not exist or the passed UID isnull
.
-
getByTag
Gets theModuleType
s filtered by tag.- Type Parameters:
T
- the type of the required object.- Parameters:
moduleTypeTag
- specifies the filter for getting theModuleType
s, if it isnull
then returns allModuleType
s.- Returns:
- the
ModuleType
s, which correspond to the specified filter.
-
getByTag
<T extends ModuleType> Collection<T> getByTag(@Nullable String moduleTypeTag, @Nullable Locale locale) This method is used for getting theModuleType
s filtered by tag.- Type Parameters:
T
- the type of the required object.- Parameters:
moduleTypeTag
- specifies the filter for getting theModuleType
s, if it isnull
then returns allModuleType
s.locale
- used for localization of theModuleType
.- Returns:
- the
ModuleType
s, which correspond to the specified filter.
-
getByTags
This method is used for getting theModuleType
s filtered by tags.- Type Parameters:
T
- the type of the required object.- Parameters:
tags
- specifies the filter for getting theModuleType
s, if it isnull
then returns allModuleType
s.- Returns:
- the
ModuleType
s, which correspond to the filter.
-
getByTags
This method is used for getting theModuleType
s filtered by tags.- Type Parameters:
T
- the type of the required object.- Parameters:
locale
- used for localization of theModuleType
.tags
- specifies the filter for getting theModuleType
s, if it isnull
then returns allModuleType
s.- Returns:
- the
ModuleType
s, which correspond to the filter.
-
getTriggers
This method is used for getting theTriggerType
s. The returnedTriggerType
s are localized by default locale.- Parameters:
tags
- specifies the filter for getting theTriggerType
s, if it isnull
then returns allTriggerType
s.- Returns:
- collection of all available
TriggerType
s, localized by default locale.
-
getTriggers
This method is used for getting theTriggerType
s, localized depending on passed locale parameter. When the locale parameter is not specified or such localization resources are not available the returnedTriggerType
s are localized by default locale.- Parameters:
locale
- defines the localization of returnedTriggerType
s.tags
- specifies the filter for getting theTriggerType
s, if it isnull
then returns allTriggerType
s.- Returns:
- a collection of all available
TriggerType
s, localized by default locale or the passed locale parameter.
-
getConditions
This method is used for getting theConditionType
s. The returnedConditionType
s are localized by default locale.- Parameters:
tags
- specifies the filter for getting theConditionType
s, if it isnull
then returns allConditionType
s.- Returns:
- collection of all available
ConditionType
s, localized by default locale.
-
getConditions
This method is used for getting theConditionType
s, localized depending on passed locale parameter. When the locale parameter is not specified or such localization resources are not available the returnedConditionType
s are localized by default locale.- Parameters:
locale
- defines the localization of returnedConditionType
s.tags
- specifies the filter for getting theConditionType
s, if it isnull
then returns allConditionType
s.- Returns:
- a collection of all available
ConditionType
s, localized by default locale or the passed locale parameter.
-
getActions
This method is used for getting theActionType
s. The returnedActionType
s are localized by default locale.- Parameters:
tags
- specifies the filter for getting theActionType
s, if it isnull
then returns allActionType
s.- Returns:
- collection of all available
ActionType
s, localized by default locale.
-
getActions
This method is used for getting theActionType
s, localized depending on passed locale parameter. When the locale parameter is not specified or such localization resources are not available the returnedActionType
s are localized by default locale.- Parameters:
locale
- defines the localization of returnedActionType
s.tags
- specifies the filter for getting theActionType
s, if it isnull
then returns allActionType
s.- Returns:
- a collection of all available
ActionType
s, localized by default locale or the passed locale parameter.
-