Class DefaultLanguageAccess

java.lang.Object
org.eclnt.jsfserver.util.useraccess.DefaultLanguageAccess
All Implemented Interfaces:
ILanguageAccess

public class DefaultLanguageAccess extends Object implements ILanguageAccess
Default implementation of ILanguageAccess.
  • Constructor Details

    • DefaultLanguageAccess

      public DefaultLanguageAccess()
  • Method Details

    • getCurrentLanguage

      public String getCurrentLanguage()
      Returns the current language. The language is determined in the following order:
      1. Dialog session
      2. Thread local
      3. Default locale
      Specified by:
      getCurrentLanguage in interface ILanguageAccess
    • getCurrentCountry

      public String getCurrentCountry()
      Returns the current country. The country is determined in the following order:
      1. Dialog session
      2. Thread local
      3. Default locale
      Specified by:
      getCurrentCountry in interface ILanguageAccess
    • associateLanguageWithCurrentThread

      public static void associateLanguageWithCurrentThread(String language)
      Associates a language with the current thread. This will override the default locale for the current thread.
      Parameters:
      language - The language to associate with the current thread.
    • clearLanguageWithCurrentThread

      public static void clearLanguageWithCurrentThread()
      Clears the language association for the current thread. After this call, the default locale will be used again.