Class DefaultLanguageAccess
java.lang.Object
org.eclnt.jsfserver.util.useraccess.DefaultLanguageAccess
- All Implemented Interfaces:
ILanguageAccess
Default implementation of
ILanguageAccess
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
associateLanguageWithCurrentThread
(String language) Associates a language with the current thread.static void
Clears the language association for the current thread.Returns the current country.Returns the current language.
-
Constructor Details
-
DefaultLanguageAccess
public DefaultLanguageAccess()
-
-
Method Details
-
getCurrentLanguage
Returns the current language. The language is determined in the following order:- Dialog session
- Thread local
- Default locale
- Specified by:
getCurrentLanguage
in interfaceILanguageAccess
-
getCurrentCountry
Returns the current country. The country is determined in the following order:- Dialog session
- Thread local
- Default locale
- Specified by:
getCurrentCountry
in interfaceILanguageAccess
-
associateLanguageWithCurrentThread
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.
-