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 Details

    • log

      protected final org.slf4j.Logger log
      A class-level logger.
  • Constructor Details

    • BaseLocalizedServiceInfoProvider

      public BaseLocalizedServiceInfoProvider(PK id)
      Constructor.
      Parameters:
      id - the identity of this provider
  • Method Details

    • getLocalizedServiceInfo

      public LocalizedServiceInfo getLocalizedServiceInfo(Locale locale)
      Description copied from interface: LocalizedServiceInfoProvider
      Get localized information for a specific locale.
      Specified by:
      getLocalizedServiceInfo in interface LocalizedServiceInfoProvider
      Parameters:
      locale - the locale to get localized information for
      Returns:
      the localized info, never null
    • resolveInfoMessages

      protected Map<String,String> resolveInfoMessages(Locale locale)
      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