|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.format.datetime.joda.JodaTimeContextHolder
public final class JodaTimeContextHolder
A holder for a thread-local user JodaTimeContext
.
Constructor Summary | |
---|---|
JodaTimeContextHolder()
|
Method Summary | |
---|---|
static org.joda.time.format.DateTimeFormatter |
getFormatter(org.joda.time.format.DateTimeFormatter formatter,
Locale locale)
Obtain a DateTimeFormatter with user-specific settings applied to the given base Formatter. |
static JodaTimeContext |
getJodaTimeContext()
Return the JodaTimeContext associated with the current thread, if any. |
static void |
setJodaTimeContext(JodaTimeContext context)
Associate the given JodaTimeContext with the current thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JodaTimeContextHolder()
Method Detail |
---|
public static void setJodaTimeContext(JodaTimeContext context)
context
- the current JodaTimeContext, or null
to clear
the thread-bound contextpublic static JodaTimeContext getJodaTimeContext()
null
if nonepublic static org.joda.time.format.DateTimeFormatter getFormatter(org.joda.time.format.DateTimeFormatter formatter, Locale locale)
formatter
- the base formatter that establishes default formatting rules
(generally user independent)locale
- the current user locale (may be null
if not known)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |