Package net.solarnetwork.settings
Interface SettingSpecifierProvider
- All Known Subinterfaces:
FactorySettingSpecifierProvider
- All Known Implementing Classes:
BaseSettingsSpecifierLocalizedServiceInfoProvider,BasicFactorySettingSpecifierProvider
public interface SettingSpecifierProvider
API for a provider of
SettingSpecifier instances, to publish
application-managed settings.- Version:
- 2.0
- Author:
- matt
-
Method Summary
Modifier and TypeMethodDescriptionGet a non-localized display name.org.springframework.context.MessageSourceGet a MessageSource to localize the setting text.Get a list ofSettingSpecifierinstances.Get a unique, application-wide setting ID.static List<SettingSpecifier>settingsForService(String id, Iterable<? extends SettingSpecifierProvider> providers) Get the settings for a specific service.
-
Method Details
-
getSettingUid
String getSettingUid()Get a unique, application-wide setting ID.This ID must be unique across all setting providers registered within the system.
- Returns:
- unique ID
-
getDisplayName
String getDisplayName()Get a non-localized display name.- Returns:
- non-localized display name
-
getMessageSource
org.springframework.context.MessageSource getMessageSource()Get a MessageSource to localize the setting text.This method can return null if the provider does not have any localized resources.
- Returns:
- the MessageSource, or null
-
getSettingSpecifiers
List<SettingSpecifier> getSettingSpecifiers()Get a list ofSettingSpecifierinstances.- Returns:
- list of
SettingSpecifier
-
settingsForService
static List<SettingSpecifier> settingsForService(String id, Iterable<? extends SettingSpecifierProvider> providers) Get the settings for a specific service.- Parameters:
id- the ID of the service to get the settings forproviders- the available services- Returns:
- the settings, or null if not available
- Since:
- 1.1
-