Package net.solarnetwork.service.support
Class BaseLocalizedServiceInfoProvider<PK extends Comparable<PK>>
java.lang.Object
net.solarnetwork.domain.BasicIdentity<PK>
net.solarnetwork.service.support.BaseLocalizedServiceInfoProvider<PK>
- All Implemented Interfaces:
Comparable<PK>,Identity<PK>,LocalizedServiceInfoProvider
- Direct Known Subclasses:
BaseSettingsSpecifierLocalizedServiceInfoProvider
public abstract class BaseLocalizedServiceInfoProvider<PK extends Comparable<PK>>
extends BasicIdentity<PK>
implements LocalizedServiceInfoProvider
A base implementation of
LocalizedServiceInfoProvider that also
implements Identity.- Since:
- 1.43
- Version:
- 2.0
- Author:
- matt
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLocalizedServiceInfo(Locale locale) Get localized information for a specific locale.org.springframework.context.MessageSourceSet a message source to resolve messages with.resolveInfoMessages(Locale locale) Resolve the localized info messages.voidsetMessageSource(org.springframework.context.MessageSource messageSource) Get the message source to resolve messages with.Methods inherited from class net.solarnetwork.domain.BasicIdentity
clone, compareTo, equals, getId, hashCode
-
Field Details
-
log
protected final org.slf4j.Logger logA class-level logger.
-
-
Constructor Details
-
BaseLocalizedServiceInfoProvider
Constructor.- Parameters:
id- the identity of this provider
-
-
Method Details
-
getLocalizedServiceInfo
Description copied from interface:LocalizedServiceInfoProviderGet localized information for a specific locale.- Specified by:
getLocalizedServiceInfoin interfaceLocalizedServiceInfoProvider- Parameters:
locale- the locale to get localized information for- Returns:
- the localized info, never null
-
resolveInfoMessages
Resolve the localized info messages.This method returns an empty map. Extending classes can override.
- Parameters:
locale- the locale to resolve mesages for- Returns:
- the map, never null
-
getMessageSource
public org.springframework.context.MessageSource getMessageSource()Set a message source to resolve messages with.- Returns:
- the message source
-
setMessageSource
public void setMessageSource(org.springframework.context.MessageSource messageSource) Get the message source to resolve messages with.- Parameters:
messageSource- the message source
-