Jive API (3.0.13) Core Javadocs

com.jivesoftware.community.event
Class MessageEvent

java.lang.Object
  extended by 
      extended by com.jivesoftware.community.event.MessageEvent

public class MessageEvent
extends

A class for ForumMessage events. This class will be passed to EventListeners whenever a forum message event is fired and contains all the pertinent information to the event.

Certain event types will populate the params Map with additional objects as outlined below:

Event Type Extra Params
ADDED None
DELETING None
MOVED oldThreadID (Long) -- the ID of the thread the message used to belong to.
oldCommunityID (Long) -- the ID of the community the message used to belong to.
MODIFIEDNone
MODERATION_MODIFIEDoldModerationValue (Integer) -- the old moderation value of the message.
moderatorID (Long) -- the userID of user that made the moderation change, or -1 if userID is unknown or not present.
RATEDNone


Nested Class Summary
static class MessageEvent.Type
           
 
Field Summary
static String KEY_MESSAGE_ID
           
static String KEY_MODERTOR_ID
           
static String KEY_OLD_CONTAINER_ID
           
static String KEY_OLD_CONTAINER_TYPE
           
static String KEY_OLD_MODERATION_VALUE
           
static String KEY_OLD_THREAD_ID
           
static String KEY_ORIGINAL_MODERATION_VALUE
           
 
Constructor Summary
MessageEvent()
           
MessageEvent(MessageEvent.Type eventType, EntityDescriptor message, JiveContainer container, Map<String,? extends Object> params)
          Creates a new message event.
MessageEvent(MessageEvent.Type eventType, ForumMessage message, JiveContainer container, Map<String,? extends Object> params)
          Creates a new message event.
 
Method Summary
 ContentEvent.ModificationType getContentModificationType()
          A modification type from the list below that corresponds to the implementing event's type.
 EntityDescriptor getJiveContainer()
           
 int getModerationValue()
           
 EntityDescriptor getOldContainer()
           
 int getOldModerationValue()
           
 EntityDescriptor getOldThread()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_OLD_THREAD_ID

public static final String KEY_OLD_THREAD_ID
See Also:
Constant Field Values

KEY_MESSAGE_ID

public static final String KEY_MESSAGE_ID
See Also:
Constant Field Values

KEY_OLD_CONTAINER_TYPE

public static final String KEY_OLD_CONTAINER_TYPE
See Also:
Constant Field Values

KEY_OLD_CONTAINER_ID

public static final String KEY_OLD_CONTAINER_ID
See Also:
Constant Field Values

KEY_OLD_MODERATION_VALUE

public static final String KEY_OLD_MODERATION_VALUE
See Also:
Constant Field Values

KEY_ORIGINAL_MODERATION_VALUE

public static final String KEY_ORIGINAL_MODERATION_VALUE
See Also:
Constant Field Values

KEY_MODERTOR_ID

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

MessageEvent

public MessageEvent()

MessageEvent

public MessageEvent(MessageEvent.Type eventType,
                    ForumMessage message,
                    JiveContainer container,
                    Map<String,? extends Object> params)
Creates a new message event.

Parameters:
eventType - the type of the message event.
message - the message the event corresponds to.
container - the parenxt container
params - parameters corresponding to the event.

MessageEvent

public MessageEvent(MessageEvent.Type eventType,
                    EntityDescriptor message,
                    JiveContainer container,
                    Map<String,? extends Object> params)
Creates a new message event.

Parameters:
eventType - the type of the message event.
message - the message the event corresponds to.
container - the parenxt container
params - parameters corresponding to the event.
Method Detail

getJiveContainer

public EntityDescriptor getJiveContainer()

getOldThread

public EntityDescriptor getOldThread()

getOldContainer

public EntityDescriptor getOldContainer()

getOldModerationValue

public int getOldModerationValue()

getModerationValue

public int getModerationValue()

getContentModificationType

public ContentEvent.ModificationType getContentModificationType()
A modification type from the list below that corresponds to the implementing event's type.

Returns:
a ModificationType.

Jive Product Page

Copyright © 1999-2007 Jive Software.