|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.datetime.DateTimeFormatterFactoryImpl
public class DateTimeFormatterFactoryImpl
This class is responsible for providing DateTimeFormatter instances to JIRA and plugin code.
Constructor Summary | |
---|---|
DateTimeFormatterFactoryImpl(TimeZoneResolver timeZoneResolver,
JiraAuthenticationContext jiraAuthenticationContext,
ApplicationProperties applicationProperties,
com.atlassian.event.api.EventPublisher eventPublisher,
I18nHelper.BeanFactory i18nFactory)
|
Method Summary | |
---|---|
DateTimeFormatter |
formatter()
Creates a new DateTimeFormatter that uses the JIRA default time zone, locale, and relative date style. |
void |
onClearCache(ClearCacheEvent event)
Clears this instance's cache. |
void |
start()
Registers this class in the EventPublisher. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateTimeFormatterFactoryImpl(TimeZoneResolver timeZoneResolver, JiraAuthenticationContext jiraAuthenticationContext, ApplicationProperties applicationProperties, com.atlassian.event.api.EventPublisher eventPublisher, I18nHelper.BeanFactory i18nFactory)
Method Detail |
---|
public DateTimeFormatter formatter()
DateTimeFormatterFactory
relative
date style. To get a "smart" formatter that automatically uses the time zone and locale of the
currently logged in user, create a new formatter by calling DateTimeFormatter.forLoggedInUser()
on the formatter returned by this method, e.g.:
DateTimeFormatter userFormatter = dateTimeFormatterFactory.formatter().forLoggedInUser();A formatter obtained in this fashion may be safely reused across requests.
formatter
in interface DateTimeFormatterFactory
public void start()
start
in interface Startable
@EventListener public void onClearCache(ClearCacheEvent event)
event
- a ClearCacheEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |