|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.web.bean.I18nBean.CachingFactory
public static class I18nBean.CachingFactory
As the name implies: a factory that caches I18nBeans. With the advent of Plugins-2 we need to iterate through all enabled plugins and get their i18n resources when an I18nBean is constructed.
This factory was primarily created to make SAL's I18nResolver avoid having to do that iteration for every single string that needs to be internationalized. It can, obviously, be used in other contexts as well.
Constructor Summary | |
---|---|
I18nBean.CachingFactory(JiraLocaleUtils jiraLocaleUtils,
I18nTranslationMode i18nTranslationMode,
com.atlassian.event.api.EventPublisher eventPublisher)
|
Method Summary | |
---|---|
void |
afterInstantiation()
|
I18nHelper |
getInstance(ApplicationUser user)
Returns an I18nHelper instance associated with the provided User 's locale preference. |
I18nHelper |
getInstance(Locale locale)
Returns an I18nHelper instance associated with the provided Locale . |
I18nHelper |
getInstance(com.atlassian.crowd.embedded.api.User user)
Returns an I18nHelper instance associated with the provided User 's locale preference. |
String |
getStateHashCode()
An opaque string that changes whenever the underlying i18n bundles change (e.g. |
void |
pluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent event)
|
void |
pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
|
void |
pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
|
void |
pluginRefreshed(com.atlassian.plugin.event.events.PluginRefreshedEvent event)
|
void |
start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public I18nBean.CachingFactory(JiraLocaleUtils jiraLocaleUtils, I18nTranslationMode i18nTranslationMode, com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail |
---|
public void start()
Startable
start
in interface Startable
public void afterInstantiation() throws Exception
afterInstantiation
in interface InitializingComponent
Exception
@EventListener public void pluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent event)
@EventListener public void pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
@EventListener public void pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
@EventListener public void pluginRefreshed(com.atlassian.plugin.event.events.PluginRefreshedEvent event)
public I18nHelper getInstance(Locale locale)
I18nHelper.BeanFactory
I18nHelper
instance associated with the provided Locale
. Note that since JIRA 6.0
you can have an I18nHelper
injected directly into your class, and it will be specific to the
currently logged in user.
getInstance
in interface I18nHelper.BeanFactory
locale
- the locale in play
I18nHelper
instance associated with the provided Locale
I18nHelper
public I18nHelper getInstance(com.atlassian.crowd.embedded.api.User user)
I18nHelper.BeanFactory
I18nHelper
instance associated with the provided User
's locale preference. Note
that since JIRA 6.0 you can have an I18nHelper
injected directly into your class, and it will be
specific to the currently logged in user.
getInstance
in interface I18nHelper.BeanFactory
user
- the user in play
I18nHelper
instance associated with the provided User
's locale preferenceI18nHelper
public I18nHelper getInstance(ApplicationUser user)
I18nHelper.BeanFactory
I18nHelper
instance associated with the provided User
's locale preference. Note
that since JIRA 6.0 you can have an I18nHelper
injected directly into your class, and it will be
specific to the currently logged in user.
getInstance
in interface I18nHelper.BeanFactory
user
- the user in play
I18nHelper
instance associated with the provided User
's locale preferenceI18nHelper
public String getStateHashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |