com.atlassian.confluence.util.i18n
Class DefaultI18NBeanFactory

java.lang.Object
  extended by com.atlassian.confluence.util.i18n.DefaultI18NBeanFactory
All Implemented Interfaces:
I18NBeanFactory, org.springframework.beans.factory.DisposableBean

public class DefaultI18NBeanFactory
extends java.lang.Object
implements I18NBeanFactory, org.springframework.beans.factory.DisposableBean

Produces I18NBeans which will return a bean either for the default or setup locale.


Constructor Summary
DefaultI18NBeanFactory()
           
DefaultI18NBeanFactory(com.atlassian.plugin.PluginAccessor pluginAccessor)
          Instantiates a factory producing I18NBeans using the LocaleManager.DEFAULT_LOCALE.
DefaultI18NBeanFactory(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.config.ApplicationConfiguration applicationConfig)
          Instantiates a factory producing I18NBeans using the SessionKeys.LOCALE_FOR_SETUP and LocaleManager.DEFAULT_LOCALE as a fallback.
 
Method Summary
 void destroy()
           
 I18NBean getI18NBean()
           
 I18NBean getI18NBean(java.util.Locale locale)
           
 void setModeManager(I18nModeManager modeManager)
           
 void setPluginEventManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultI18NBeanFactory

public DefaultI18NBeanFactory()

DefaultI18NBeanFactory

public DefaultI18NBeanFactory(com.atlassian.plugin.PluginAccessor pluginAccessor)
Instantiates a factory producing I18NBeans using the LocaleManager.DEFAULT_LOCALE.


DefaultI18NBeanFactory

public DefaultI18NBeanFactory(com.atlassian.plugin.PluginAccessor pluginAccessor,
                              com.atlassian.config.ApplicationConfiguration applicationConfig)
Instantiates a factory producing I18NBeans using the SessionKeys.LOCALE_FOR_SETUP and LocaleManager.DEFAULT_LOCALE as a fallback.

Method Detail

getI18NBean

public I18NBean getI18NBean(java.util.Locale locale)
Specified by:
getI18NBean in interface I18NBeanFactory
Parameters:
locale - locale for i18n
Returns:
i18n bean for specified locale

getI18NBean

public I18NBean getI18NBean()
Specified by:
getI18NBean in interface I18NBeanFactory
Returns:
i18n bean for the system default locale

setModeManager

public void setModeManager(I18nModeManager modeManager)

setPluginEventManager

public void setPluginEventManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager)

destroy

public void destroy()
             throws java.lang.Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
java.lang.Exception


Copyright © 2003-2013 Atlassian. All Rights Reserved.