Class LocalizationServiceImpl

java.lang.Object
com.google.common.util.concurrent.AbstractIdleService
org.somda.sdc.glue.provider.localization.LocalizationServiceImpl
All Implemented Interfaces:
com.google.common.util.concurrent.Service, LocalizationService

public class LocalizationServiceImpl extends com.google.common.util.concurrent.AbstractIdleService implements LocalizationService
Default implementation of LocalizationService
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service

    com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getLocalizedText(List<String> ref, BigInteger version, List<String> lang, List<LocalizedTextWidth> textWidth, List<BigInteger> numberOfLines)
    Gets a localized text that is referenced in the MDIB.
    Gets a list of all supported languages.
    protected void
     
    protected void
     

    Methods inherited from class com.google.common.util.concurrent.AbstractIdleService

    addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, startAsync, state, stopAsync, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.common.util.concurrent.Service

    addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
  • Constructor Details

    • LocalizationServiceImpl

      @Inject public LocalizationServiceImpl(LocalizationStorage localizationStorage)
  • Method Details

    • startUp

      protected void startUp() throws Exception
      Specified by:
      startUp in class com.google.common.util.concurrent.AbstractIdleService
      Throws:
      Exception
    • shutDown

      protected void shutDown() throws Exception
      Specified by:
      shutDown in class com.google.common.util.concurrent.AbstractIdleService
      Throws:
      Exception
    • getLocalizedText

      public List<LocalizedText> getLocalizedText(List<String> ref, @Nullable BigInteger version, List<String> lang, List<LocalizedTextWidth> textWidth, List<BigInteger> numberOfLines)
      Description copied from interface: LocalizationService
      Gets a localized text that is referenced in the MDIB.
      Specified by:
      getLocalizedText in interface LocalizationService
      Parameters:
      ref - a zero or more reference names of the texts that are requested.
      version - of the referenced text that is requested. The latest version is used if parameter is null.
      lang - a zero or more language identifiers to get different translations of the requested text.
      textWidth - a zero or more LocalizedTextWidth identifiers to filter for different text widths.
      numberOfLines - a zero or more BigInteger to filter for number of lines.
      Returns:
      a list of LocalizedText texts that matches search criteria.
    • getSupportedLanguages

      public List<String> getSupportedLanguages()
      Description copied from interface: LocalizationService
      Gets a list of all supported languages.
      Specified by:
      getSupportedLanguages in interface LocalizationService
      Returns:
      a list of supported language identifiers.