Class StubLocaleProvider

    • Constructor Summary

      Constructors 
      Constructor Description
      StubLocaleProvider​(java.util.Locale locale)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Locale getCurrentDataLocale()
      Returns current (session) data locale to be used to read or store localized attribute data.
      java.util.List<java.util.Locale> getFallbacks​(java.util.Locale requestedLocale)
      Returns a List with fallback Locales for the given Locale.
      boolean isFallbackEnabled()
      Returns true if for the current session the Locale fallback is enabled.
      java.util.Locale toDataLocale​(java.util.Locale external)
      Converts a arbitrary locale instance into one which is allowed to read and write data with.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StubLocaleProvider

        public StubLocaleProvider​(java.util.Locale locale)
    • Method Detail

      • getFallbacks

        public java.util.List<java.util.Locale> getFallbacks​(java.util.Locale requestedLocale)
        Description copied from interface: LocaleProvider
        Returns a List with fallback Locales for the given Locale.
        Specified by:
        getFallbacks in interface LocaleProvider
        Parameters:
        requestedLocale - the Locale for which all fallback Locales are requested.
        Returns:
        null if the locale fallback is not enabled (see LocaleProvider.isFallbackEnabled()).
      • isFallbackEnabled

        public boolean isFallbackEnabled()
        Description copied from interface: LocaleProvider
        Returns true if for the current session the Locale fallback is enabled.
        Specified by:
        isFallbackEnabled in interface LocaleProvider
        Returns:
        false otherwise.
      • toDataLocale

        public java.util.Locale toDataLocale​(java.util.Locale external)
        Description copied from interface: LocaleProvider
        Converts a arbitrary locale instance into one which is allowed to read and write data with.
        Specified by:
        toDataLocale in interface LocaleProvider
        Parameters:
        external - the locale