com.atlassian.jira.config
Class DefaultReindexMessageManager

java.lang.Object
  extended by com.atlassian.jira.config.DefaultReindexMessageManager
All Implemented Interfaces:
ReindexMessageManager, Startable

public class DefaultReindexMessageManager
extends Object
implements ReindexMessageManager, Startable

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

Since:
v4.0

Constructor Summary
DefaultReindexMessageManager(JiraPropertySetFactory jiraPropertySetFactory, UserFormatManager userFormatManager, I18nHelper.BeanFactory i18nFactory, OutlookDateManager outlookDateManager, VelocityRequestContextFactory velocityRequestContextFactory, com.atlassian.event.api.EventPublisher eventPublisher)
           
 
Method Summary
 void clear()
          Clears any current message.
 String getMessage(User user)
           
 void onClearCache(ClearCacheEvent event)
           
 void pushMessage(User user, String i18nTask)
          Pushes a new message.
 void start()
          This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultReindexMessageManager

public DefaultReindexMessageManager(JiraPropertySetFactory jiraPropertySetFactory,
                                    UserFormatManager userFormatManager,
                                    I18nHelper.BeanFactory i18nFactory,
                                    OutlookDateManager outlookDateManager,
                                    VelocityRequestContextFactory velocityRequestContextFactory,
                                    com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail

start

public void start()
           throws Exception
Description copied from interface: Startable
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.

Specified by:
start in interface Startable
Throws:
Exception - Allows implementations to throw an Exception.

onClearCache

@EventListener
public void onClearCache(ClearCacheEvent event)

pushMessage

public void pushMessage(User user,
                        String i18nTask)
Description copied from interface: ReindexMessageManager
Pushes a new message. This will replace any existing messages.

Specified by:
pushMessage in interface ReindexMessageManager
Parameters:
user - the user performing the task.
i18nTask - the i18n key of the task being performed.

clear

public void clear()
Description copied from interface: ReindexMessageManager
Clears any current message.

Specified by:
clear in interface ReindexMessageManager

getMessage

public String getMessage(User user)
Specified by:
getMessage in interface ReindexMessageManager
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.


Copyright © 2002-2010 Atlassian. All Rights Reserved.