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
ProducesI18NBean
s which will return a bean either for the default or setup locale.
-
-
Field Summary
Fields Modifier and Type Field Description static String
HELP_PATHS_RESOURCE_NAME
static String
HELP_PATHS_RESOURCE_TYPE
static String
I18N_RESOURCE_TYPE
-
Constructor Summary
Constructors Constructor Description DefaultI18NBeanFactory()
DefaultI18NBeanFactory(com.atlassian.plugin.PluginAccessor pluginAccessor)
Instantiates a factory producingI18NBean
s using theLocaleManager.DEFAULT_LOCALE
.DefaultI18NBeanFactory(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.config.ApplicationConfiguration applicationConfig)
Instantiates a factory producingI18NBean
s using theSessionKeys.LOCALE_FOR_SETUP
andLocaleManager.DEFAULT_LOCALE
as a fallback.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
destroy()
static I18NBean
getDefaultI18NBean()
Deprecated.since 7.0.1@NonNull I18NBean
getI18NBean()
@NonNull I18NBean
getI18NBean(@NonNull Locale locale)
@NonNull String
getStateHash()
void
setModeManager(I18nModeManager modeManager)
void
setPluginEventManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
-
-
-
Field Detail
-
HELP_PATHS_RESOURCE_NAME
public static final String HELP_PATHS_RESOURCE_NAME
- See Also:
- Constant Field Values
-
HELP_PATHS_RESOURCE_TYPE
public static final String HELP_PATHS_RESOURCE_TYPE
- See Also:
- Constant Field Values
-
I18N_RESOURCE_TYPE
public static final String I18N_RESOURCE_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultI18NBeanFactory
public DefaultI18NBeanFactory()
-
DefaultI18NBeanFactory
public DefaultI18NBeanFactory(com.atlassian.plugin.PluginAccessor pluginAccessor)
Instantiates a factory producingI18NBean
s using theLocaleManager.DEFAULT_LOCALE
.
-
DefaultI18NBeanFactory
public DefaultI18NBeanFactory(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.config.ApplicationConfiguration applicationConfig)
Instantiates a factory producingI18NBean
s using theSessionKeys.LOCALE_FOR_SETUP
andLocaleManager.DEFAULT_LOCALE
as a fallback.
-
-
Method Detail
-
getDefaultI18NBean
@Deprecated public static I18NBean 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
public @NonNull I18NBean getI18NBean(@NonNull Locale locale)
- Specified by:
getI18NBean
in interfaceI18NBeanFactory
- Parameters:
locale
- locale for i18n- Returns:
- i18n bean for specified locale
-
getI18NBean
public @NonNull I18NBean getI18NBean()
- Specified by:
getI18NBean
in interfaceI18NBeanFactory
- Returns:
- i18n bean for the system default locale
-
getStateHash
public @NonNull String getStateHash()
- Specified by:
getStateHash
in interfaceI18NBeanFactory
- Returns:
- a hash of the current state of this factory.
-
setModeManager
public void setModeManager(I18nModeManager modeManager)
-
setPluginEventManager
public void setPluginEventManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
-
-