Package com.atlassian.jira.config
Class DefaultReindexMessageManager
java.lang.Object
com.atlassian.jira.config.DefaultReindexMessageManager
- All Implemented Interfaces:
ReindexMessageManager,InitializingComponent
public class DefaultReindexMessageManager
extends Object
implements ReindexMessageManager, InitializingComponent
Default implementation of the Reindex Message Manager that uses a simple PropertySet to store the last message
pushed.
- Since:
- v4.0
-
Field Summary
Fields inherited from interface com.atlassian.jira.config.ReindexMessageManager
DISMISSAL_FLAG -
Constructor Summary
ConstructorsConstructorDescriptionDefaultReindexMessageManager(JiraPropertySetFactory jiraPropertySetFactory, UserKeyService userKeyService, UserFormats userFormats, I18nHelper.BeanFactory i18nFactory, VelocityRequestContextFactory velocityRequestContextFactory, GlobalPermissionManager globalPermissionManager, TaskManager taskManager, com.atlassian.cache.CacheManager cacheManager, com.atlassian.beehive.ClusterLockService clusterLockService, FlagDismissalService flagDismissalService, DateTimeFormatterFactory dateTimeFormatterFactory, HelpUrls helpUrls) -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled after all the beans are constructed and the ApplicationContext is fully populated.voidclear()Clears any current message.voidclearMessageForTimestamp(Date time) Clears message if it was posted before a specific timegetMessage(ApplicationUser user) Get current message localised for given user.Get current message object for given user.voidonClearCache(ClearCacheEvent event) voidpushMessage(ApplicationUser user, String i18nTask) Pushes a new message.voidpushRawMessage(ApplicationUser user, String i18nMessage) Pushes a new raw message.
-
Constructor Details
-
DefaultReindexMessageManager
public DefaultReindexMessageManager(JiraPropertySetFactory jiraPropertySetFactory, UserKeyService userKeyService, UserFormats userFormats, I18nHelper.BeanFactory i18nFactory, VelocityRequestContextFactory velocityRequestContextFactory, GlobalPermissionManager globalPermissionManager, TaskManager taskManager, com.atlassian.cache.CacheManager cacheManager, com.atlassian.beehive.ClusterLockService clusterLockService, FlagDismissalService flagDismissalService, DateTimeFormatterFactory dateTimeFormatterFactory, HelpUrls helpUrls)
-
-
Method Details
-
afterInstantiation
Description copied from interface:InitializingComponentCalled after all the beans are constructed and the ApplicationContext is fully populated. Order of execution is order of bean creation, driven by InitializingComponentProcessor.- Specified by:
afterInstantiationin interfaceInitializingComponent- Throws:
Exception
-
onClearCache
-
pushMessage
Description copied from interface:ReindexMessageManagerPushes a new message. This will replace any existing messages.- Specified by:
pushMessagein interfaceReindexMessageManager- Parameters:
user- the user performing the task. May benull, in which case a more generic notification will be displayedi18nTask- the i18n key of the task being performed.
-
pushRawMessage
Description copied from interface:ReindexMessageManagerPushes a new raw message. This will replace any existing messages.- Specified by:
pushRawMessagein interfaceReindexMessageManager- Parameters:
user- the user performing the task. May benull, in which case a more generic notification will be displayedi18nMessage- the i18n key of the message being performed.
-
clear
public void clear()Description copied from interface:ReindexMessageManagerClears any current message.- Specified by:
clearin interfaceReindexMessageManager
-
getMessage
Description copied from interface:ReindexMessageManagerGet current message localised for given user.- Specified by:
getMessagein interfaceReindexMessageManager- Parameters:
user- the current user- Returns:
- the current message, localised for the current user, presented in HTML (and already escaped). null if there is no current message.
-
getMessageObject
Description copied from interface:ReindexMessageManagerGet current message object for given user.- Specified by:
getMessageObjectin interfaceReindexMessageManager- Returns:
- the current message data.
-
clearMessageForTimestamp
Description copied from interface:ReindexMessageManagerClears message if it was posted before a specific time- Specified by:
clearMessageForTimestampin interfaceReindexMessageManager- Parameters:
time- If the message was posted before this time it will be cleared.
-