public class DefaultReindexMessageManager extends Object implements ReindexMessageManager, Startable
DISMISSAL_FLAG
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
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)
public void start()
Startable
@EventListener public void onClearCache(ClearCacheEvent event)
public void pushMessage(ApplicationUser user, String i18nTask)
ReindexMessageManager
pushMessage
in interface ReindexMessageManager
user
- the user performing the task. May be null
, in which case a more generic
notification will be displayedi18nTask
- the i18n key of the task being performed.public void pushRawMessage(ApplicationUser user, String i18nMessage)
ReindexMessageManager
pushRawMessage
in interface ReindexMessageManager
user
- the user performing the task. May be null
, in which case a more generic
notification will be displayedi18nMessage
- the i18n key of the message being performed.public void clear()
ReindexMessageManager
clear
in interface ReindexMessageManager
public String getMessage(ApplicationUser user)
ReindexMessageManager
getMessage
in interface ReindexMessageManager
user
- the current userpublic ReindexMessage getMessageObject()
ReindexMessageManager
getMessageObject
in interface ReindexMessageManager
public void clearMessageForTimestamp(Date time)
ReindexMessageManager
clearMessageForTimestamp
in interface ReindexMessageManager
time
- If the message was posted before this time it will be cleared.Copyright © 2002-2015 Atlassian. All Rights Reserved.