public class

DefaultReindexMessageManager

extends Object
implements ReindexMessageManager Startable
java.lang.Object
   ↳ com.atlassian.jira.config.DefaultReindexMessageManager

Class Overview

Default implementation of the Reindex Message Manager that uses a simple PropertySet to store the last message pushed.

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.config.ReindexMessageManager
Public Constructors
DefaultReindexMessageManager(JiraPropertySetFactory jiraPropertySetFactory, UserKeyService userKeyService, UserFormats userFormats, I18nHelper.BeanFactory i18nFactory, VelocityRequestContextFactory velocityRequestContextFactory, GlobalPermissionManager globalPermissionManager, TaskManager taskManager, CacheManager cacheManager, ClusterLockService clusterLockService, FlagDismissalService flagDismissalService, DateTimeFormatterFactory dateTimeFormatterFactory, HelpUrls helpUrls)
Public Methods
void clear()
Clears any current message.
void clearMessageForTimestamp(Date time)
Clears message if it was posted before a specific time
String getMessage(ApplicationUser user)
Get current message localised for given user.
ReindexMessage getMessageObject()
Get current message object for given user.
@EventListener 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.
void start()
This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.config.ReindexMessageManager
From interface com.atlassian.jira.extension.Startable

Public Constructors

public DefaultReindexMessageManager (JiraPropertySetFactory jiraPropertySetFactory, UserKeyService userKeyService, UserFormats userFormats, I18nHelper.BeanFactory i18nFactory, VelocityRequestContextFactory velocityRequestContextFactory, GlobalPermissionManager globalPermissionManager, TaskManager taskManager, CacheManager cacheManager, ClusterLockService clusterLockService, FlagDismissalService flagDismissalService, DateTimeFormatterFactory dateTimeFormatterFactory, HelpUrls helpUrls)

Public Methods

public void clear ()

Clears any current message.

public void clearMessageForTimestamp (Date time)

Clears message if it was posted before a specific time

Parameters
time If the message was posted before this time it will be cleared.

public String getMessage (ApplicationUser user)

Get current message localised for given user.

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.

public ReindexMessage getMessageObject ()

Get current message object for given user.

Returns
  • the current message data.

@EventListener public void onClearCache (ClearCacheEvent event)

public void pushMessage (ApplicationUser user, String i18nTask)

Pushes a new message. This will replace any existing messages.

Parameters
user the user performing the task. May be null, in which case a more generic notification will be displayed
i18nTask the i18n key of the task being performed.

public void pushRawMessage (ApplicationUser user, String i18nMessage)

Pushes a new raw message. This will replace any existing messages.

Parameters
user the user performing the task. May be null, in which case a more generic notification will be displayed
i18nMessage the i18n key of the message being performed.

public void start ()

This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.