Class CachingI18NBeanFactory
- java.lang.Object
-
- com.atlassian.confluence.util.i18n.CachingI18NBeanFactory
-
- All Implemented Interfaces:
I18NBeanFactory
public class CachingI18NBeanFactory extends Object implements I18NBeanFactory
-
-
Constructor Summary
Constructors Constructor Description CachingI18NBeanFactory(com.atlassian.vcache.VCacheFactory cacheFactory, I18NBeanFactory defaultI18NBeanFactory, com.atlassian.event.api.EventPublisher eventPublisher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull I18NBean
getI18NBean()
@NonNull I18NBean
getI18NBean(@NonNull Locale locale)
@NonNull String
getStateHash()
void
initialiseCacheAndRegisterEventListener()
void
onGlobalSettingsChangedEvent(GlobalSettingsChangedEvent event)
void
onPluginEvent(PluginEvent event)
This listens to the confluence-level plugin events, which have come across the cluster.void
onPluginFrameworkStartedEvent(PluginFrameworkStartedEvent event)
void
onPluginSystemPluginDisabledEvent(com.atlassian.plugin.event.events.PluginDisabledEvent pluginDisabledEvent)
void
onPluginSystemPluginEnabledEvent(com.atlassian.plugin.event.events.PluginEnabledEvent pluginEnabledEvent)
void
onPluginSystemPluginUpgradedEvent(com.atlassian.plugin.event.events.PluginUpgradedEvent pluginUpgradedEvent)
void
onRemoteEvent(ClusterEventWrapper wrapper)
Listens for cluster-wrapped events that this class needs to worry about, unwraps them and handles them accordinglyvoid
onTranslationTransformStateChangedEvent(TranslationTransformStateChangedEvent translationTransformStateChangedEvent)
void
unregisterEventListener()
-
-
-
Constructor Detail
-
CachingI18NBeanFactory
public CachingI18NBeanFactory(com.atlassian.vcache.VCacheFactory cacheFactory, I18NBeanFactory defaultI18NBeanFactory, com.atlassian.event.api.EventPublisher eventPublisher)
-
-
Method Detail
-
initialiseCacheAndRegisterEventListener
@PostConstruct public void initialiseCacheAndRegisterEventListener()
-
unregisterEventListener
@PreDestroy public void unregisterEventListener()
-
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.
-
onGlobalSettingsChangedEvent
@EventListener public void onGlobalSettingsChangedEvent(GlobalSettingsChangedEvent event)
-
onPluginFrameworkStartedEvent
@EventListener public void onPluginFrameworkStartedEvent(PluginFrameworkStartedEvent event)
-
onPluginEvent
@EventListener public void onPluginEvent(PluginEvent event)
This listens to the confluence-level plugin events, which have come across the cluster. seePluginEvent
-
onPluginSystemPluginEnabledEvent
@EventListener public void onPluginSystemPluginEnabledEvent(com.atlassian.plugin.event.events.PluginEnabledEvent pluginEnabledEvent)
-
onPluginSystemPluginDisabledEvent
@EventListener public void onPluginSystemPluginDisabledEvent(com.atlassian.plugin.event.events.PluginDisabledEvent pluginDisabledEvent)
-
onPluginSystemPluginUpgradedEvent
@EventListener public void onPluginSystemPluginUpgradedEvent(com.atlassian.plugin.event.events.PluginUpgradedEvent pluginUpgradedEvent)
-
onRemoteEvent
@EventListener public void onRemoteEvent(ClusterEventWrapper wrapper)
Listens for cluster-wrapped events that this class needs to worry about, unwraps them and handles them accordingly
-
onTranslationTransformStateChangedEvent
@EventListener public void onTranslationTransformStateChangedEvent(TranslationTransformStateChangedEvent translationTransformStateChangedEvent)
-
-