com.atlassian.confluence.util.message
Class DefaultMessageManager

java.lang.Object
  extended bycom.atlassian.confluence.util.message.DefaultMessageManager
All Implemented Interfaces:
MessageManager

public class DefaultMessageManager
extends Object
implements MessageManager

Handles messages using Bandana for message persistence. Stores space-specific messages against the space and all others in the general bandana context. This ensures the space messages are removed when the space is removed.


Field Summary
static String PERSISTENCE_KEY
           
 
Constructor Summary
DefaultMessageManager()
           
 
Method Summary
 void addMessage(Message message)
          Add a global message
 void addMessage(String spaceKey, String username, Message message)
          Add a message specific to a space and/or user
 List getMessages()
          Gets all global messages
 List getMessages(String spaceKey, String user)
          Get all messages for a given space and/or user, including global messages
 void removeMessage(String spaceKey, String id)
          Removes a message
 void setBandanaManager(BandanaManager bandanaManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERSISTENCE_KEY

public static final String PERSISTENCE_KEY
See Also:
Constant Field Values
Constructor Detail

DefaultMessageManager

public DefaultMessageManager()
Method Detail

getMessages

public List getMessages(String spaceKey,
                        String user)
Description copied from interface: MessageManager
Get all messages for a given space and/or user, including global messages

Specified by:
getMessages in interface MessageManager
Parameters:
spaceKey - The space key
user - The user name
Returns:
A list of relevant Message objects

getMessages

public List getMessages()
Description copied from interface: MessageManager
Gets all global messages

Specified by:
getMessages in interface MessageManager
Returns:
A list of global Message objects

removeMessage

public void removeMessage(String spaceKey,
                          String id)
Description copied from interface: MessageManager
Removes a message

Specified by:
removeMessage in interface MessageManager
Parameters:
id - The message id
spaceKey - The space key

addMessage

public void addMessage(Message message)
Description copied from interface: MessageManager
Add a global message

Specified by:
addMessage in interface MessageManager
Parameters:
message - The message

addMessage

public void addMessage(String spaceKey,
                       String username,
                       Message message)
Description copied from interface: MessageManager
Add a message specific to a space and/or user

Specified by:
addMessage in interface MessageManager
Parameters:
spaceKey - The space key
username - The user name
message - The message

setBandanaManager

public void setBandanaManager(BandanaManager bandanaManager)


Confluence is developed by Atlassian.