com.jivesoftware.community.event
Class CommentEvent
java.lang.Object
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 Type | Extra Params |
| ADDED | None |
| DELETING | None |
| MODERATION_MODIFIED | | Name | Value |
| originalValue | An Integer of the original value |
| community | The community in which the moderation is changing |
|
| MODIFIED | | Reason | Name | Value |
| Body was modified | Type | bodyModify |
| Body was modified | originalValue | The body before it was modified
|
|
| Property was modified | Type | propertyModify |
| Property was modified | PropertyKey | The name of the property |
| Property was modified | originalValue | The property value before it was
modified |
|
| Property was added | Type | propertyAdd |
| Property was added | PropertyKey | The name of the new property |
|
| Property was deleted | Type | propertyDelete |
| Property was deleted | PropertyKey | The name of the property that is
going to be deleted |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommentEvent
public CommentEvent()
CommentEvent
public CommentEvent(CommentEvent.Type eventType,
Comment comment)
CommentEvent
public CommentEvent(CommentEvent.Type eventType,
Comment comment,
Map<String,Object> params)
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.
Copyright © 1999-2007 Jive Software.