Package com.atlassian.jira.config
Class DefaultReindexMessageManager
java.lang.Object
com.atlassian.jira.config.DefaultReindexMessageManager
- All Implemented Interfaces:
ReindexMessageManager
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 TypeMethodDescriptionvoid
clear()
Clears any current message.void
clearMessageForTimestamp
(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.void
onClearCache
(ClearCacheEvent event) void
pushMessage
(ApplicationUser user, String i18nTask) Pushes a new message.void
pushRawMessage
(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
-
onClearCache
-
pushMessage
Description copied from interface:ReindexMessageManager
Pushes a new message. This will replace any existing messages.- Specified by:
pushMessage
in 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:ReindexMessageManager
Pushes a new raw message. This will replace any existing messages.- Specified by:
pushRawMessage
in 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:ReindexMessageManager
Clears any current message.- Specified by:
clear
in interfaceReindexMessageManager
-
getMessage
Description copied from interface:ReindexMessageManager
Get current message localised for given user.- Specified by:
getMessage
in 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:ReindexMessageManager
Get current message object for given user.- Specified by:
getMessageObject
in interfaceReindexMessageManager
- Returns:
- the current message data.
-
clearMessageForTimestamp
Description copied from interface:ReindexMessageManager
Clears message if it was posted before a specific time- Specified by:
clearMessageForTimestamp
in interfaceReindexMessageManager
- Parameters:
time
- If the message was posted before this time it will be cleared.
-