Clearspace API (1.7.0) Core Javadocs

com.jivesoftware.community.event
Class BlogPostEvent

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

public class BlogPostEvent
extends java.lang.Object
implements JiveEvent

A class for BlogPost events. This class will be passed to BlogPostListeners whenever a blog post 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
POST_CREATED None
POST_DELETING None
POST_MODIFIEDNone
POST_RATEDUser, Rating, PreviousRating
POST_VIEWEDNone


Field Summary
static int POST_CREATED
          Post was added to the system.
static int POST_DELETING
          Post is about to be deleted.
static int POST_MODIFIED
          Post was modified.
static int POST_RATED
          Post was rated.
static int POST_VIEWED
          Post was viewed.
 
Constructor Summary
BlogPostEvent(int eventType, BlogPost post, java.util.Map<java.lang.String,? extends java.lang.Object> params)
          Creates a new post event.
 
Method Summary
 BlogPost getBlogPost()
          Returns the post that the event corresponds to.
 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

POST_CREATED

public static final int POST_CREATED
Post was added to the system.

See Also:
Constant Field Values

POST_DELETING

public static final int POST_DELETING
Post is about to be deleted.

See Also:
Constant Field Values

POST_MODIFIED

public static final int POST_MODIFIED
Post was modified.

See Also:
Constant Field Values

POST_RATED

public static final int POST_RATED
Post was rated.

See Also:
Constant Field Values

POST_VIEWED

public static final int POST_VIEWED
Post was viewed.

See Also:
Constant Field Values
Constructor Detail

BlogPostEvent

public BlogPostEvent(int eventType,
                     BlogPost post,
                     java.util.Map<java.lang.String,? extends java.lang.Object> params)
Creates a new post event.

Parameters:
eventType - the type of the post event.
post - the post the event corresponds to.
params - parameters corresponding to the event.
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.

getBlogPost

public BlogPost getBlogPost()
Returns the post that the event corresponds to.

Returns:
the post the event corresponds to.

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.