LocaleResolverFixedLocaleResolver, SessionLocaleResolverpublic abstract class AbstractLocaleResolver extends java.lang.Object implements LocaleResolver
LocaleResolver implementations.
Provides support for a default locale and timezone.
Created: 2016. 3. 13.
| Constructor | Description |
|---|---|
AbstractLocaleResolver() |
| Modifier and Type | Method | Description |
|---|---|---|
java.util.Locale |
getDefaultLocale() |
Return the default Locale that this resolver is supposed to fall back to, if any.
|
java.util.TimeZone |
getDefaultTimeZone() |
Return the default TimeZone that this resolver is supposed to fall back to, if any.
|
protected java.util.Locale |
resolveDefaultLocale(Translet translet) |
Resolve the default locale for the given translet,
Called if can not find specified Locale.
|
protected java.util.TimeZone |
resolveDefaultTimeZone(Translet translet) |
Resolve the default time zone for the given translet,
Called if can not find specified TimeZone.
|
void |
setDefaultLocale(java.lang.String defaultLocale) |
Set a default Locale that this resolver will return if no other locale found.
|
void |
setDefaultLocale(java.util.Locale defaultLocale) |
Set a default Locale that this resolver will return if no other locale found.
|
void |
setDefaultTimeZone(java.lang.String defaultTimeZone) |
Set a default TimeZone that this resolver will return if no other time zone found.
|
void |
setDefaultTimeZone(java.util.TimeZone defaultTimeZone) |
Set a default TimeZone that this resolver will return if no other time zone found.
|
void |
setLocale(Translet translet,
java.util.Locale locale) |
Set the current locale to the given one.
|
void |
setTimeZone(Translet translet,
java.util.TimeZone timeZone) |
Set the current timezone to the given one.
|
resolveLocale, resolveTimeZonepublic java.util.Locale getDefaultLocale()
public void setDefaultLocale(java.util.Locale defaultLocale)
defaultLocale - the default localepublic void setDefaultLocale(java.lang.String defaultLocale)
defaultLocale - the default localepublic java.util.TimeZone getDefaultTimeZone()
public void setDefaultTimeZone(java.util.TimeZone defaultTimeZone)
defaultTimeZone - the default time zonepublic void setDefaultTimeZone(java.lang.String defaultTimeZone)
defaultTimeZone - the default time zoneprotected java.util.Locale resolveDefaultLocale(Translet translet)
translet - the translet to resolve the locale fornull)setDefaultLocale(java.util.Locale)protected java.util.TimeZone resolveDefaultTimeZone(Translet translet)
translet - the translet to resolve the time zone fornull if none defined)setDefaultTimeZone(java.util.TimeZone)public void setLocale(Translet translet, java.util.Locale locale)
LocaleResolversetLocale in interface LocaleResolvertranslet - the translet to resolve the locale forlocale - the new locale, or null to clear the localepublic void setTimeZone(Translet translet, java.util.TimeZone timeZone)
LocaleResolversetTimeZone in interface LocaleResolvertranslet - the translet to resolve the locale fortimeZone - the new timezone, or null to clear the timezoneCopyright © 2008–2018 The Aspectran Project. All rights reserved.