Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.community.event
Class CommunityEvent

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

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

A class for Community events. This class will be passed to CommunityListeners whenever a community 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
COMMUNITY_ADDEDNone
COMMUNITY_DELETINGNone
COMMUNITY_MOVED
NameValue
OriginalCommunityThe original community
DestinationCommunityThe destination community
COMMUNITY_MODIFIED
ReasonNameValue
Name was modifiedTypenameModify
Name was modifiedoriginalValueThe name before it was modified

Description was modifiedTypedescriptionModify
Description was modifiedoriginalValueThe description 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

A blog was addedTypeblogAdded
A blog was addedblogThe blog being added

A blog was removedTypeblogRemoved
A blog was removedblogThe blog being removed

Community index was changedTypeIndexChange
COMMUNITY_MERGING
NameValue
destCommunityThe destination community


Field Summary
static int COMMUNITY_ADDED
          Event type for whenever a community is added to another community.
static int COMMUNITY_DELETING
          Event type for whenever a community is about to be deleted.
static int COMMUNITY_MERGING
          When two communities are merged
static int COMMUNITY_MODIFIED
          Event type for whenever a community is modified.
static int COMMUNITY_MOVED
          Event type for whenever a community is moved.
 
Constructor Summary
CommunityEvent(int eventType, Community community, Map<String,?> params)
           
 
Method Summary
 Community getCommunity()
           
 Date getDate()
           
 int getEventType()
           
 Map<String,?> getParams()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMUNITY_ADDED

public static final int COMMUNITY_ADDED
Event type for whenever a community is added to another community.

See Also:
Constant Field Values

COMMUNITY_DELETING

public static final int COMMUNITY_DELETING
Event type for whenever a community is about to be deleted.

See Also:
Constant Field Values

COMMUNITY_MOVED

public static final int COMMUNITY_MOVED
Event type for whenever a community is moved.

See Also:
Constant Field Values

COMMUNITY_MODIFIED

public static final int COMMUNITY_MODIFIED
Event type for whenever a community is modified.

See Also:
Constant Field Values

COMMUNITY_MERGING

public static final int COMMUNITY_MERGING
When two communities are merged

See Also:
Constant Field Values
Constructor Detail

CommunityEvent

public CommunityEvent(int eventType,
                      Community community,
                      Map<String,?> params)
Method Detail

getEventType

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

getCommunity

public Community getCommunity()

getParams

public Map<String,?> 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.