Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.community.event
Class CommentEvent

java.lang.Object
  extended by com.jivesoftware.community.event.CommentEvent
All Implemented Interfaces:
com.jivesoftware.community.JiveEvent

public class CommentEvent
extends Object
implements com.jivesoftware.community.JiveEvent

A class for Comment events. This class will be passed to CommentListeners whenever a comment 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 TypeExtra Params
COMMENT_ADDEDNone
COMMENT_DELETEDNone
COMMENT_MODERATION_MODIFIED
NameValue
originalValueAn Integer of the original value
communityThe community in which the moderation is changing
COMMENT_MODIFIED
ReasonNameValue
Body was modifiedTypebodyModify
Body was modifiedoriginalValueThe body before it was modified

Property was modifiedTypepropertyModify
Property was modifiedPropertyKeyThe name of the property
Property was modifiedoriginalValueThe property value before it was modified

Property was addedTypepropertyAdd
Property was addedPropertyKeyThe name of the new property

Property was deletedTypepropertyDelete
Property was deletedPropertyKeyThe name of the property that is going to be deleted


Field Summary
static int COMMENT_ADDED
          Event type for whenever a comment is added to a document.
static int COMMENT_DELETED
          Event type for whenever a comment is deleted from a document.
static int COMMENT_MODERATION_MODIFIED
          Event type for whenever a comment's moderation value changes.
static int COMMENT_MODIFIED
          Event type for whenever a comment is modified.
 
Constructor Summary
CommentEvent(int eventType, Comment comment, Map<String,? extends Object> params)
           
 
Method Summary
 Comment getComment()
           
 Date getDate()
           
 int getEventType()
           
 Map<String,? extends Object> getParams()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMENT_ADDED

public static final int COMMENT_ADDED
Event type for whenever a comment is added to a document.

See Also:
Constant Field Values

COMMENT_DELETED

public static final int COMMENT_DELETED
Event type for whenever a comment is deleted from a document.

See Also:
Constant Field Values

COMMENT_MODIFIED

public static final int COMMENT_MODIFIED
Event type for whenever a comment is modified.

See Also:
Constant Field Values

COMMENT_MODERATION_MODIFIED

public static final int COMMENT_MODERATION_MODIFIED
Event type for whenever a comment's moderation value changes.

See Also:
Constant Field Values
Constructor Detail

CommentEvent

public CommentEvent(int eventType,
                    Comment comment,
                    Map<String,? extends Object> params)
Method Detail

getEventType

public int getEventType()
Specified by:
getEventType in interface com.jivesoftware.community.JiveEvent

getComment

public Comment getComment()

getParams

public Map<String,? extends Object> getParams()
Specified by:
getParams in interface com.jivesoftware.community.JiveEvent

getDate

public Date getDate()
Specified by:
getDate in interface com.jivesoftware.community.JiveEvent

Clearspace Project Page

Copyright © 1999-2007 Jive Software.