Jive API (3.0.13) Core Javadocs

com.jivesoftware.community.event
Class CommentEvent

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

public class CommentEvent
extends

A class for Comment events. This class will be passed to EventListeners 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
ADDEDNone
DELETINGNone
MODERATION_MODIFIED
NameValue
originalValueAn Integer of the original value
communityThe community in which the moderation is changing
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


Nested Class Summary
static class CommentEvent.Type
           
 
Constructor Summary
CommentEvent()
           
CommentEvent(CommentEvent.Type eventType, Comment comment)
           
CommentEvent(CommentEvent.Type eventType, Comment comment, Map<String,Object> params)
           
 
Method Summary
 EntityDescriptor getCommentContentResource()
           
 EntityDescriptor getContainer()
           
 ModificationType getContentModificationType()
          A modification type from the list below that corresponds to the implementing event's type.
 Date getCreationDate()
           
 long getIndirectObjectID()
          Get the id of the Indirect object, or -1 if the given event's Type is not ditransitive.
 int getIndirectObjectType()
          Get the type of the Indirect object, or -1 if the given event's Type is not ditransitive.
 Long getUserID()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentEvent

public CommentEvent()

CommentEvent

public CommentEvent(CommentEvent.Type eventType,
                    Comment comment)

CommentEvent

public CommentEvent(CommentEvent.Type eventType,
                    Comment comment,
                    Map<String,Object> params)
Method Detail

getUserID

public Long getUserID()

getContainer

public EntityDescriptor getContainer()

getCommentContentResource

public EntityDescriptor getCommentContentResource()

getCreationDate

public Date getCreationDate()

getContentModificationType

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

Returns:
a ModificationType.

getIndirectObjectID

public long getIndirectObjectID()
Get the id of the Indirect object, or -1 if the given event's Type is not ditransitive.

Returns:
an long ID, or -1 if the given event's Type is not ditransitive.

getIndirectObjectType

public int getIndirectObjectType()
Get the type of the Indirect object, or -1 if the given event's Type is not ditransitive.

Returns:
an integer type, or -1 if the given event's Type is not ditransitive.

Jive Product Page

Copyright © 1999-2007 Jive Software.