com.atlassian.jira.web.bean
Class I18nBean.CachingFactory

java.lang.Object
  extended by com.atlassian.jira.web.bean.I18nBean.CachingFactory
All Implemented Interfaces:
I18nHelper.BeanFactory
Enclosing class:
I18nBean

public static class I18nBean.CachingFactory
extends java.lang.Object
implements I18nHelper.BeanFactory

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(com.atlassian.cache.CacheFactory factory, com.atlassian.plugin.event.PluginEventManager pluginEventManager)
           
 
Method Summary
protected  com.atlassian.cache.Cache<java.util.Locale,I18nHelper> getCache()
           
 I18nHelper getInstance(java.util.Locale locale)
           
 I18nHelper getInstance(com.opensymphony.user.User user)
           
 void pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent ignored)
           
 void pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent ignored)
           
 void pluginRefreshed(com.atlassian.plugin.event.events.PluginRefreshedEvent ignored)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I18nBean.CachingFactory

public I18nBean.CachingFactory(com.atlassian.cache.CacheFactory factory,
                               com.atlassian.plugin.event.PluginEventManager pluginEventManager)
Method Detail

pluginModuleDisabled

public void pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent ignored)

pluginModuleEnabled

public void pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent ignored)

pluginRefreshed

public void pluginRefreshed(com.atlassian.plugin.event.events.PluginRefreshedEvent ignored)

getInstance

public I18nHelper getInstance(java.util.Locale locale)
Specified by:
getInstance in interface I18nHelper.BeanFactory

getInstance

public I18nHelper getInstance(com.opensymphony.user.User user)
Specified by:
getInstance in interface I18nHelper.BeanFactory

getCache

protected com.atlassian.cache.Cache<java.util.Locale,I18nHelper> getCache()


Copyright © 2002-2010 Atlassian. All Rights Reserved.