Package org.openhab.core.automation.type
Interface ModuleTypeRegistry
- All Superinterfaces:
Registry<ModuleType,String>
This interface provides functionality to get available
ModuleTypes. 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 localizedModuleTypeby specified UID and locale.getActions(String... tags) This method is used for getting theActionTypes.getActions(@Nullable Locale locale, String... tags) This method is used for getting theActionTypes, localized depending on passed locale parameter.<T extends ModuleType>
Collection<T> Gets theModuleTypes filtered by tag.<T extends ModuleType>
Collection<T> This method is used for getting theModuleTypes filtered by tag.<T extends ModuleType>
Collection<T> This method is used for getting theModuleTypes filtered by tags.<T extends ModuleType>
Collection<T> This method is used for getting theModuleTypes filtered by tags.getConditions(String... tags) This method is used for getting theConditionTypes.getConditions(@Nullable Locale locale, String... tags) This method is used for getting theConditionTypes, localized depending on passed locale parameter.getTriggers(String... tags) This method is used for getting theTriggerTypes.getTriggers(@Nullable Locale locale, String... tags) This method is used for getting theTriggerTypes, localized depending on passed locale parameter.Methods inherited from interface org.openhab.core.common.registry.Registry
add, addRegistryChangeListener, get, getAll, remove, removeRegistryChangeListener, stream, update
-
Method Details
-
get
Gets the localizedModuleTypeby specified UID and locale.- Type Parameters:
T- the type of the required object.- Parameters:
moduleTypeUID- the a unique id in scope of registeredModuleTypes.locale- used for localization of theModuleType.- Returns:
- the desired
ModuleTypeinstance ornullif a module type with such UID does not exist or the passed UID isnull.
-
getByTag
Gets theModuleTypes filtered by tag.- Type Parameters:
T- the type of the required object.- Parameters:
moduleTypeTag- specifies the filter for getting theModuleTypes, if it isnullthen returns allModuleTypes.- Returns:
- the
ModuleTypes, 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 theModuleTypes filtered by tag.- Type Parameters:
T- the type of the required object.- Parameters:
moduleTypeTag- specifies the filter for getting theModuleTypes, if it isnullthen returns allModuleTypes.locale- used for localization of theModuleType.- Returns:
- the
ModuleTypes, which correspond to the specified filter.
-
getByTags
This method is used for getting theModuleTypes filtered by tags.- Type Parameters:
T- the type of the required object.- Parameters:
tags- specifies the filter for getting theModuleTypes, if it isnullthen returns allModuleTypes.- Returns:
- the
ModuleTypes, which correspond to the filter.
-
getByTags
This method is used for getting theModuleTypes 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 theModuleTypes, if it isnullthen returns allModuleTypes.- Returns:
- the
ModuleTypes, which correspond to the filter.
-
getTriggers
This method is used for getting theTriggerTypes. The returnedTriggerTypes are localized by default locale.- Parameters:
tags- specifies the filter for getting theTriggerTypes, if it isnullthen returns allTriggerTypes.- Returns:
- collection of all available
TriggerTypes, localized by default locale.
-
getTriggers
This method is used for getting theTriggerTypes, localized depending on passed locale parameter. When the locale parameter is not specified or such localization resources are not available the returnedTriggerTypes are localized by default locale.- Parameters:
locale- defines the localization of returnedTriggerTypes.tags- specifies the filter for getting theTriggerTypes, if it isnullthen returns allTriggerTypes.- Returns:
- a collection of all available
TriggerTypes, localized by default locale or the passed locale parameter.
-
getConditions
This method is used for getting theConditionTypes. The returnedConditionTypes are localized by default locale.- Parameters:
tags- specifies the filter for getting theConditionTypes, if it isnullthen returns allConditionTypes.- Returns:
- collection of all available
ConditionTypes, localized by default locale.
-
getConditions
This method is used for getting theConditionTypes, localized depending on passed locale parameter. When the locale parameter is not specified or such localization resources are not available the returnedConditionTypes are localized by default locale.- Parameters:
locale- defines the localization of returnedConditionTypes.tags- specifies the filter for getting theConditionTypes, if it isnullthen returns allConditionTypes.- Returns:
- a collection of all available
ConditionTypes, localized by default locale or the passed locale parameter.
-
getActions
This method is used for getting theActionTypes. The returnedActionTypes are localized by default locale.- Parameters:
tags- specifies the filter for getting theActionTypes, if it isnullthen returns allActionTypes.- Returns:
- collection of all available
ActionTypes, localized by default locale.
-
getActions
This method is used for getting theActionTypes, localized depending on passed locale parameter. When the locale parameter is not specified or such localization resources are not available the returnedActionTypes are localized by default locale.- Parameters:
locale- defines the localization of returnedActionTypes.tags- specifies the filter for getting theActionTypes, if it isnullthen returns allActionTypes.- Returns:
- a collection of all available
ActionTypes, localized by default locale or the passed locale parameter.
-