Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.event
Class PollEvent

java.lang.Object
  extended by com.jivesoftware.base.event.PollEvent
All Implemented Interfaces:
JiveEvent

public class PollEvent
extends java.lang.Object
implements JiveEvent

An event for Poll objects. Certain event types will populate the params Map with additional objects as outlined below:

Event Type Extra Params
POLL_CREATED None
POLL_DELETED None
VOTE_ADDED user (User) -- the user that performed the voting action.
ANONYMOUS_VOTE_ADDED None
VOTE_MODIFIED user (User) -- the user that performed the voting action.
oldValue (Integer) -- the old vote value.
ANONYMOUS_VOTE_MODIFIED oldValue (Integer) -- the old vote value.
VOTE_REMOVED user (User) -- the user that performed the voting action.
ANONYMOUS_VOTE_REMOVED None

Since:
4.0

Field Summary
static int ANONYMOUS_VOTE_ADDED
          An anonymous vote was added to the poll.
static int ANONYMOUS_VOTE_MODIFIED
          An anonymous vote was modified.
static int ANONYMOUS_VOTE_REMOVED
          An anonymous vote was removed.
static int POLL_CREATED
          A poll was created.
static int POLL_DELETED
          A poll is about to be deleted.
static int VOTE_ADDED
          A vote was added to the poll.
static int VOTE_MODIFIED
          A vote was modified.
static int VOTE_REMOVED
          A vote was removed.
 
Constructor Summary
PollEvent(int eventType, Poll poll, java.util.Map params)
          Creates a new message event.
 
Method Summary
 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 getParams()
          Returns a map of parameters which can be used to pass data to a listener.
 Poll getPoll()
          Returns the Poll that the event corresponds to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POLL_CREATED

public static final int POLL_CREATED
A poll was created.

See Also:
Constant Field Values

POLL_DELETED

public static final int POLL_DELETED
A poll is about to be deleted.

See Also:
Constant Field Values

VOTE_ADDED

public static final int VOTE_ADDED
A vote was added to the poll.

See Also:
Constant Field Values

ANONYMOUS_VOTE_ADDED

public static final int ANONYMOUS_VOTE_ADDED
An anonymous vote was added to the poll.

See Also:
Constant Field Values

VOTE_MODIFIED

public static final int VOTE_MODIFIED
A vote was modified.

See Also:
Constant Field Values

ANONYMOUS_VOTE_MODIFIED

public static final int ANONYMOUS_VOTE_MODIFIED
An anonymous vote was modified.

See Also:
Constant Field Values

VOTE_REMOVED

public static final int VOTE_REMOVED
A vote was removed.

See Also:
Constant Field Values

ANONYMOUS_VOTE_REMOVED

public static final int ANONYMOUS_VOTE_REMOVED
An anonymous vote was removed.

See Also:
Constant Field Values
Constructor Detail

PollEvent

public PollEvent(int eventType,
                 Poll poll,
                 java.util.Map params)
Creates a new message event.

Parameters:
eventType - the type of the message event.
poll - the poll 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.

getPoll

public Poll getPoll()
Returns the Poll that the event corresponds to.

Returns:
the poll the event corresponds to.

getParams

public java.util.Map 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.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.