Class DefaultI18NBeanFactory
java.lang.Object
com.atlassian.confluence.util.i18n.DefaultI18NBeanFactory
- All Implemented Interfaces:
I18NBeanFactory,org.springframework.beans.factory.DisposableBean
public class DefaultI18NBeanFactory
extends Object
implements I18NBeanFactory, org.springframework.beans.factory.DisposableBean
Produces
I18NBeans which will return a bean either for the default or setup locale.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultI18NBeanFactory(com.atlassian.plugin.PluginAccessor pluginAccessor) Instantiates a factory producingI18NBeans using theLocaleManager.DEFAULT_LOCALE.DefaultI18NBeanFactory(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.config.ApplicationConfiguration applicationConfig) Instantiates a factory producingI18NBeans using theSessionKeys.LOCALE_FOR_SETUPandLocaleManager.DEFAULT_LOCALEas a fallback. -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()static I18NBeanDeprecated.since 7.0.1@NonNull I18NBean@NonNull I18NBeangetI18NBean(@NonNull Locale locale) @NonNull StringvoidsetModeManager(I18nModeManager modeManager) voidsetPluginEventManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
-
Field Details
-
HELP_PATHS_RESOURCE_NAME
- See Also:
-
HELP_PATHS_RESOURCE_TYPE
- See Also:
-
I18N_RESOURCE_TYPE
- See Also:
-
-
Constructor Details
-
DefaultI18NBeanFactory
public DefaultI18NBeanFactory() -
DefaultI18NBeanFactory
public DefaultI18NBeanFactory(com.atlassian.plugin.PluginAccessor pluginAccessor) Instantiates a factory producingI18NBeans using theLocaleManager.DEFAULT_LOCALE. -
DefaultI18NBeanFactory
public DefaultI18NBeanFactory(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.config.ApplicationConfiguration applicationConfig) Instantiates a factory producingI18NBeans using theSessionKeys.LOCALE_FOR_SETUPandLocaleManager.DEFAULT_LOCALEas a fallback.
-
-
Method Details
-
getDefaultI18NBean
Deprecated.since 7.0.1- Returns:
- I18NBean that can be accessed from any context and only contains the default bundle for the default locale. TODO this needs to be removed once all dependencies on I18NSupport are gone.
- Since:
- 7.0.1
-
getI18NBean
- Specified by:
getI18NBeanin interfaceI18NBeanFactory- Parameters:
locale- locale for i18n- Returns:
- i18n bean for specified locale
-
getI18NBean
- Specified by:
getI18NBeanin interfaceI18NBeanFactory- Returns:
- i18n bean for the system default locale
-
getStateHash
- Specified by:
getStateHashin interfaceI18NBeanFactory- Returns:
- a hash of the current state of this factory.
-
setModeManager
-
setPluginEventManager
public void setPluginEventManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager) -
destroy
- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-