Interface IntegrationLocalizationService

  • All Known Implementing Classes:
    DefaultIntegrationLocalizationService

    public interface IntegrationLocalizationService
    A service for determining locale specific information for the integration purposes.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Collection<java.util.Locale> getAllSupportedLocales()
      Retrieves all locales supported by the platform
      java.util.Locale getDefaultLocale()
      Retrieves a locale to be used when the locale is not explicitly specified for the incoming/outgoing integration data.
      java.util.Optional<java.util.Locale> getSupportedLocale​(java.lang.String isoCode)
      Retrieves a locale supported by the platform, which corresponds to the specified ISO code.
      java.util.Locale getSupportedLocaleForLanguageTag​(java.lang.String languageTag)
      Creates a Locale for the provided language tag, and verifies that the locale is supported.
      void validateLocale​(java.util.Locale locale)
      Validates the locale language matches corresponds to an existing LanguageModel.
    • Method Detail

      • getSupportedLocale

        java.util.Optional<java.util.Locale> getSupportedLocale​(java.lang.String isoCode)
        Retrieves a locale supported by the platform, which corresponds to the specified ISO code.
        Parameters:
        isoCode - an ISO code, for which a Locale should be retrieved.
        Returns:
        an Optional containing the Locale, if the ISO code is valid and is supported by the platform; otherwise, Optional.empty() is returned.
      • getAllSupportedLocales

        java.util.Collection<java.util.Locale> getAllSupportedLocales()
        Retrieves all locales supported by the platform
        Returns:
        a list of all locales, which could be used with integration objects data.
      • getDefaultLocale

        java.util.Locale getDefaultLocale()
        Retrieves a locale to be used when the locale is not explicitly specified for the incoming/outgoing integration data.
        Returns:
        a default locale to use when no explicit locale specified.
      • validateLocale

        void validateLocale​(java.util.Locale locale)
        Validates the locale language matches corresponds to an existing LanguageModel.
        Parameters:
        locale - - the locale that is being validated
      • getSupportedLocaleForLanguageTag

        java.util.Locale getSupportedLocaleForLanguageTag​(java.lang.String languageTag)
        Creates a Locale for the provided language tag, and verifies that the locale is supported. Implementations are expected to throw an exception if the langaugeTag is not supported.
        Parameters:
        languageTag - - language tag that holds information used to construct a Locale
        Returns:
        - a supported Locale for the languageTag