Package de.uplanet.lucy.server
Class ContextLocale
java.lang.Object
de.uplanet.lucy.server.ContextLocale
-
Method Summary
Modifier and TypeMethodDescriptionstatic ILocale
get
(de.uplanet.lucy.server.connector.IServerBridgeRequest p_request, de.uplanet.lucy.server.session.ISession p_session) Get the locale that's associated with the current execution context.static ILocale
get
(IProcessingContext p_ctx) static ILocale
get
(javax.servlet.http.HttpServletRequest p_request, de.uplanet.lucy.server.session.ISession p_session) Get the locale that's associated with the current execution context.
-
Method Details
-
get
- Parameters:
p_ctx
- The processing context (could benull
). Get the locale for the given processing context.- See Also:
-
get
public static ILocale get(de.uplanet.lucy.server.connector.IServerBridgeRequest p_request, de.uplanet.lucy.server.session.ISession p_session) Get the locale that's associated with the current execution context.The returned value is given by, in order,
- the request's cookie
COOKIE.LOCALE
, - the given session's
SESSVAR.LOCALE
, - the given session user's
defaultLocale
, if it exists, or - the value given by
DefaultLocale.get()
.
- Parameters:
p_request
- A request object, ornull
.p_session
- A session object, ornull
.- Returns:
- A locale.
- the request's cookie
-
get
public static ILocale get(javax.servlet.http.HttpServletRequest p_request, de.uplanet.lucy.server.session.ISession p_session) Get the locale that's associated with the current execution context.The returned value is given by, in order,
- the request's cookie
COOKIE.LOCALE
, - the given session's
SESSVAR.LOCALE
, - the given session user's
defaultLocale
, if it exists, or - the value given by
DefaultLocale.get()
.
- Parameters:
p_request
- A request object, ornull
.p_session
- A session object, ornull
.- Returns:
- A locale.
- the request's cookie
-