com.infoengine.procunit
Class IELocaleFinder

java.lang.Object
  extended bycom.infoengine.procunit.IELocaleFinder

public class IELocaleFinder
extends Object


Field Summary
private static Map localeTable
           
 
Constructor Summary
IELocaleFinder()
           
 
Method Summary
static Locale extractLocale(Request request)
          Extracts the locale from the Request.
static Locale getLocale()
          Gives the Locale from the current request.
static Locale getLocale(Request request)
          Gives the Locale from the current request.
static void setLocale(Locale locale)
          Sets the locale and the current thread in the table.
static void setLocale(Request request)
          Sets the locale from the SERVER context group of a Request object.
static void setLocale(String languagePreferences)
          Sets the locale from a String encoded in the format of an HTTP "Accept-Language" header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localeTable

private static Map localeTable
Constructor Detail

IELocaleFinder

public IELocaleFinder()
Method Detail

getLocale

public static Locale getLocale()
Gives the Locale from the current request.

Returns:
Locale the locale

getLocale

public static Locale getLocale(Request request)
Gives the Locale from the current request.

Parameters:
request - the request object.
Returns:
Locale the locale object

setLocale

public static void setLocale(Locale locale)
Sets the locale and the current thread in the table.

Parameters:
locale - The locale to be set.

setLocale

public static void setLocale(String languagePreferences)
Sets the locale from a String encoded in the format of an HTTP "Accept-Language" header.

Parameters:
languagePreferences - the language preferences, encoded in HTTP "Accept-Language" format

setLocale

public static void setLocale(Request request)
Sets the locale from the SERVER context group of a Request object.

Parameters:
request - The request object from which to obtain the SERVER context group.

extractLocale

public static Locale extractLocale(Request request)
Extracts the locale from the Request.

Parameters:
request - the Request
Returns:
The locale from the request parameter.