Clearspace API (1.3.0) Core Javadocs

com.jivesoftware.community.event
Class CommentEvent

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

public class CommentEvent
extends java.lang.Object
implements 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, java.util.Map<java.lang.String,? extends java.lang.Object> params)
           
 
Method Summary
 Comment getComment()
           
 java.util.Date getDate()
          Returns the date (as a Date object) that the event was created.
 int getEventType()
          Returns the event type corresponding to the event.
 java.util.Map<java.lang.String,? extends java.lang.Object> getParams()
          Returns a map of parameters which can be used to pass data to a listener.
 
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,
                    java.util.Map<java.lang.String,? extends java.lang.Object> params)
Method Detail

getEventType

public int getEventType()
Description copied from interface: JiveEvent
Returns the event type corresponding to the event.

Specified by:
getEventType in interface JiveEvent
Returns:
the event type corresponding to the event.

getComment

public Comment getComment()

getParams

public java.util.Map<java.lang.String,? extends java.lang.Object> getParams()
Description copied from interface: JiveEvent
Returns a map of parameters which can be used to pass data to a listener.

Specified by:
getParams in interface JiveEvent
Returns:
map of parameters which can be used to pass data to a listener.

getDate

public java.util.Date getDate()
Description copied from interface: JiveEvent
Returns the date (as a Date object) that the event was created.

Specified by:
getDate in interface JiveEvent
Returns:
the date (as a Date object) that the event was created.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.