Class BaseSettingsSpecifierLocalizedServiceInfoProvider<PK extends Comparable<PK>>
java.lang.Object
net.solarnetwork.domain.BasicIdentity<PK>
net.solarnetwork.service.support.BaseLocalizedServiceInfoProvider<PK>
net.solarnetwork.settings.support.BaseSettingsSpecifierLocalizedServiceInfoProvider<PK>
- All Implemented Interfaces:
Comparable<PK>,Identity<PK>,LocalizedServiceInfoProvider,SettingSpecifierProvider
public abstract class BaseSettingsSpecifierLocalizedServiceInfoProvider<PK extends Comparable<PK>>
extends BaseLocalizedServiceInfoProvider<PK>
implements SettingSpecifierProvider
Convenient abstract class that is both a
SettingSpecifierProvider and
a LocalizedServiceInfoProvider.- Since:
- 1.43
- Version:
- 2.0
- Author:
- matt
-
Field Summary
Fields inherited from class net.solarnetwork.service.support.BaseLocalizedServiceInfoProvider
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLocalizedServiceInfo(Locale locale) Get localized information for a specific locale.Get a unique, application-wide setting ID.protected voidpopulateInfoMessages(Locale locale, SettingSpecifier spec, Map<String, String> msgs, org.springframework.context.MessageSource ms) Populate the info messages for a singleSettingSpecifier.resolveInfoMessages(Locale locale) Resolve the localized info messages.Methods inherited from class net.solarnetwork.service.support.BaseLocalizedServiceInfoProvider
getMessageSource, setMessageSourceMethods inherited from class net.solarnetwork.domain.BasicIdentity
clone, compareTo, equals, getId, hashCodeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.solarnetwork.settings.SettingSpecifierProvider
getDisplayName, getMessageSource, getSettingSpecifiers
-
Constructor Details
-
BaseSettingsSpecifierLocalizedServiceInfoProvider
Constructor.- Parameters:
id- the identity of this provider
-
-
Method Details
-
getSettingUid
Description copied from interface:SettingSpecifierProviderGet a unique, application-wide setting ID.This ID must be unique across all setting providers registered within the system.
- Specified by:
getSettingUidin interfaceSettingSpecifierProvider- Returns:
- unique ID
-
getLocalizedServiceInfo
Description copied from interface:LocalizedServiceInfoProviderGet localized information for a specific locale.- Specified by:
getLocalizedServiceInfoin interfaceLocalizedServiceInfoProvider- Overrides:
getLocalizedServiceInfoin classBaseLocalizedServiceInfoProvider<PK extends Comparable<PK>>- Parameters:
locale- the locale to get localized information for- Returns:
- the localized info, never null
-
resolveInfoMessages
Description copied from class:BaseLocalizedServiceInfoProviderResolve the localized info messages.This method returns an empty map. Extending classes can override.
- Overrides:
resolveInfoMessagesin classBaseLocalizedServiceInfoProvider<PK extends Comparable<PK>>- Parameters:
locale- the locale to resolve mesages for- Returns:
- the map, never null
-
populateInfoMessages
protected void populateInfoMessages(Locale locale, SettingSpecifier spec, Map<String, String> msgs, org.springframework.context.MessageSource ms) Populate the info messages for a singleSettingSpecifier.This implementation looks for message codes based on
KeyedSettingSpecifier.getKey()values with.keyand.descappended, for "title" and "description" messages for that setting.- Parameters:
locale- the desired localespec- the specifiermsgs- the info map to store the resolved messages inms- the message source to resolve messages with
-