public class LocaleChangeInterceptor
extends java.lang.Object
Created: 2016. 3. 13.
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
DEFAULT_LOCALE_PARAM_NAME |
Default name of the locale specification parameter: "locale".
|
static java.lang.String |
DEFAULT_TIMEZONE_PARAM_NAME |
Default name of the timezone specification parameter: "timezone".
|
protected Log |
log |
Constructor | Description |
---|---|
LocaleChangeInterceptor() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String[] |
getAllowedMethods() |
Return the configured HTTP methods.
|
java.lang.String |
getLocaleParamName() |
Return the name of the parameter that contains a locale specification
in a locale change request.
|
java.lang.String |
getTimeZoneParamName() |
Return the name of the parameter that contains a timezone specification
in a timezone change request.
|
void |
handle(Translet translet,
LocaleResolver localeResolver) |
|
boolean |
isIgnoreInvalidLocale() |
Return whether to ignore an invalid value for the locale parameter.
|
void |
setIgnoreInvalidLocale(boolean ignoreInvalidLocale) |
Set whether to ignore an invalid value for the locale parameter.
|
void |
setLocaleParamName(java.lang.String localeParamName) |
Set the name of the parameter that contains a locale specification
in a locale change request.
|
void |
setRequestMethods(java.lang.String... requestMethods) |
Configure the request method(s) over which the locale can be changed.
|
void |
setTimeZoneParamName(java.lang.String timezoneParamName) |
Set the name of the parameter that contains a timezone specification
in a locale change request.
|
public static final java.lang.String DEFAULT_LOCALE_PARAM_NAME
public static final java.lang.String DEFAULT_TIMEZONE_PARAM_NAME
protected final Log log
public void setLocaleParamName(java.lang.String localeParamName)
localeParamName
- the locale parameter namepublic void setTimeZoneParamName(java.lang.String timezoneParamName)
timezoneParamName
- the timezone parameter namepublic java.lang.String getLocaleParamName()
public java.lang.String getTimeZoneParamName()
public void setRequestMethods(java.lang.String... requestMethods)
requestMethods
- the methodspublic java.lang.String[] getAllowedMethods()
public void setIgnoreInvalidLocale(boolean ignoreInvalidLocale)
ignoreInvalidLocale
- whether ignoring invalid localepublic boolean isIgnoreInvalidLocale()
public void handle(Translet translet, LocaleResolver localeResolver)
Copyright © 2008–2018 The Aspectran Project. All rights reserved.