Class ConfigDescriptionRegistry
ConfigDescriptionRegistry
provides access to ConfigDescription
s.
It tracks ConfigDescriptionProvider
OSGi services to collect all ConfigDescription
s.- Author:
- Dennis Nobel - Initial contribution, Michael Grammling - Initial contribution, Chris Jackson - Added compatibility with multiple ConfigDescriptionProviders. Added Config OptionProvider., Thomas Höfer - Added unit
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addConfigDescriptionAliasProvider
(ConfigDescriptionAliasProvider configDescriptionAliasProvider) protected void
addConfigDescriptionProvider
(ConfigDescriptionProvider configDescriptionProvider) protected void
addConfigOptionProvider
(ConfigOptionProvider configOptionProvider) @Nullable ConfigDescription
getConfigDescription
(URI uri) Returns a config description for a given URI.@Nullable ConfigDescription
getConfigDescription
(URI uri, @Nullable Locale locale) Returns a config description for a given URI.Returns all config descriptions.getConfigDescriptions
(@Nullable Locale locale) Returns all config descriptions.protected void
removeConfigDescriptionAliasProvider
(ConfigDescriptionAliasProvider configDescriptionAliasProvider) protected void
removeConfigDescriptionProvider
(ConfigDescriptionProvider configDescriptionProvider) protected void
removeConfigOptionProvider
(ConfigOptionProvider configOptionProvider)
-
Constructor Details
-
ConfigDescriptionRegistry
public ConfigDescriptionRegistry()
-
-
Method Details
-
addConfigOptionProvider
-
removeConfigOptionProvider
-
addConfigDescriptionProvider
-
removeConfigDescriptionProvider
-
addConfigDescriptionAliasProvider
protected void addConfigDescriptionAliasProvider(ConfigDescriptionAliasProvider configDescriptionAliasProvider) -
removeConfigDescriptionAliasProvider
protected void removeConfigDescriptionAliasProvider(ConfigDescriptionAliasProvider configDescriptionAliasProvider) -
getConfigDescriptions
Returns all config descriptions.If more than one
ConfigDescriptionProvider
is registered for a specific URI, then the returnedConfigDescription
collection will contain the data from all providers.No checking is performed to ensure that multiple providers don't provide the same configuration data. It is up to the binding to ensure that multiple sources (eg static XML and dynamic binding data) do not contain overlapping information.
- Parameters:
locale
- locale- Returns:
- all config descriptions or an empty collection if no config description exists
-
getConfigDescriptions
Returns all config descriptions.- Returns:
- all config descriptions or an empty collection if no config description exists
-
getConfigDescription
Returns a config description for a given URI.If more than one
ConfigDescriptionProvider
is registered for the requested URI, then the returnedConfigDescription
will contain the data from all providers.No checking is performed to ensure that multiple providers don't provide the same configuration data. It is up to the binding to ensure that multiple sources (eg static XML and dynamic binding data) do not contain overlapping information.
- Parameters:
uri
- the URI to which the config description to be returned (must not be null)locale
- locale- Returns:
- config description or null if no config description exists for the given name
-
getConfigDescription
Returns a config description for a given URI.- Parameters:
uri
- the URI to which the config description to be returned (must not be null)- Returns:
- config description or null if no config description exists for the given name
-