public class HttpLocaleHandler extends Object
Modifier and Type | Class and Description |
---|---|
class |
HttpLocaleHandler.HttpLocale
HTTP locale object with information about the best matched locale based on Accept-Language header,
cookie usage and the NAS language object.
|
static class |
HttpLocaleHandler.Language
Object constructed from language configuration in the settings xml file.
|
Modifier and Type | Field and Description |
---|---|
LinkedHashMap<String,HttpLocaleHandler.Language> |
languageLHM
Structure including the
|
Map<String,Locale> |
localeMap
Map of all Locale objects registered by the execution environment. |
Modifier | Constructor and Description |
---|---|
protected |
HttpLocaleHandler()
Constructor should only be used locally or in unit test.
|
Modifier and Type | Method and Description |
---|---|
static HttpLocaleHandler |
getInstance()
Construct a HTTP locale handler.
|
HttpLocaleHandler.HttpLocale |
localeGetSet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Determine the closest locale that matches the information in the HTTP request.
|
public final Map<String,Locale> localeMap
Map
of all Locale objects registered by the execution environment.public final LinkedHashMap<String,HttpLocaleHandler.Language> languageLHM
protected HttpLocaleHandler()
public static HttpLocaleHandler getInstance()
public HttpLocaleHandler.HttpLocale localeGetSet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
req
- HTTP request objectresp
- HTTP response objectHttpLocale
object determined to be the closest match to what the request wantsCopyright © 2005–2018 The Royal Danish Library, the National Library of France and the Austrian National Library.. All rights reserved.