Package org.openhab.core.addon
Class AddonInfoRegistry
java.lang.Object
org.openhab.core.addon.AddonInfoRegistry
The
AddonInfoRegistry provides access to AddonInfo objects.
It tracks AddonInfoProvider OSGi services to collect all AddonInfo objects.- Author:
- Dennis Nobel - Initial contribution, Michael Grammling - Initial contribution, added locale support
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAddonInfoProvider(AddonInfoProvider addonInfoProvider) @Nullable AddonInfogetAddonInfo(String uid) Returns the add-on information for the specified add-on UID, ornullif no add-on information could be found.@Nullable AddonInfogetAddonInfo(String uid, @Nullable Locale locale) Returns the add-on information for the specified add-on UID and locale (language), ornullif no add-on information could be found.Returns all add-on information this registry contains.getAddonInfos(@Nullable Locale locale) Returns all add-on information in the specified locale (language) this registry contains.voidremoveAddonInfoProvider(AddonInfoProvider addonInfoProvider)
-
Constructor Details
-
AddonInfoRegistry
public AddonInfoRegistry()
-
-
Method Details
-
addAddonInfoProvider
-
removeAddonInfoProvider
-
getAddonInfo
Returns the add-on information for the specified add-on UID, ornullif no add-on information could be found.- Parameters:
uid- the UID to be looked- Returns:
- a add-on information object (could be null)
-
getAddonInfo
Returns the add-on information for the specified add-on UID and locale (language), ornullif no add-on information could be found.If more than one provider provides information for the specified add-on UID and locale, it returns a new
AddonInfocontaining merged information from all such providers.- Parameters:
uid- the UID to be looked forlocale- the locale to be used for the add-on information (could be null)- Returns:
- a localized add-on information object (could be null)
-
getAddonInfos
Returns all add-on information this registry contains.- Returns:
- a set of all add-on information this registry contains (not null, could be empty)
-
getAddonInfos
Returns all add-on information in the specified locale (language) this registry contains.- Parameters:
locale- the locale to be used for the add-on information (could be null)- Returns:
- a localized set of all add-on information this registry contains (not null, could be empty)
-