Interface LocalizationServiceAccess

All Known Implementing Classes:
LocalizationServiceProxy

public interface LocalizationServiceAccess
API to invoke localization service operations.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Calls a synchronous cache prefetch of localized texts by provided version.
    default void
    Calls a synchronous cache prefetch of localized texts by provided version and languages.
    com.google.common.util.concurrent.ListenableFuture<org.somda.sdc.biceps.model.message.GetLocalizedTextResponse>
    getLocalizedText(org.somda.sdc.biceps.model.message.GetLocalizedText getLocalizedTextRequest)
    Invokes a localization service to get localized texts.
    com.google.common.util.concurrent.ListenableFuture<org.somda.sdc.biceps.model.message.GetSupportedLanguagesResponse>
    getSupportedLanguages(org.somda.sdc.biceps.model.message.GetSupportedLanguages getSupportedLanguagesRequest)
    Invokes a localization service to get supported languages.
  • Method Details

    • getLocalizedText

      com.google.common.util.concurrent.ListenableFuture<org.somda.sdc.biceps.model.message.GetLocalizedTextResponse> getLocalizedText(org.somda.sdc.biceps.model.message.GetLocalizedText getLocalizedTextRequest)
      Invokes a localization service to get localized texts.

      If there is no localization service available, this function returns with a cancelled future.

      Parameters:
      getLocalizedTextRequest - the request to send to the localization service.
      Returns:
      a future object that contains a list of localized texts.
    • getSupportedLanguages

      com.google.common.util.concurrent.ListenableFuture<org.somda.sdc.biceps.model.message.GetSupportedLanguagesResponse> getSupportedLanguages(org.somda.sdc.biceps.model.message.GetSupportedLanguages getSupportedLanguagesRequest)
      Invokes a localization service to get supported languages.

      If there is no localization service available, this function returns with a cancelled future.

      Parameters:
      getSupportedLanguagesRequest - the request to get supported languages.
      Returns:
      a future object that contains a list of supported languages.
    • cachePrefetch

      default void cachePrefetch(BigInteger version) throws InvocationException
      Calls a synchronous cache prefetch of localized texts by provided version.
      Parameters:
      version - - a version of localized texts to be included into cache.
      Throws:
      InvocationException - if localization service is not available or something goes wrong during data fetch.
    • cachePrefetch

      default void cachePrefetch(BigInteger version, List<String> lang) throws InvocationException
      Calls a synchronous cache prefetch of localized texts by provided version and languages.
      Parameters:
      version - a version of localized texts to be included into cache.
      lang - optional list of languages to be included into cache. If languages list is not provided or is empty - all languages are fetched.
      Throws:
      InvocationException - if localization service is not available or something goes wrong during data fetch.