org.ceryle.wiki.plugin.chat
Class WikiChatEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.ecyrd.jspwiki.event.WikiEvent
          extended by org.ceryle.wiki.plugin.chat.WikiChatEvent
All Implemented Interfaces:
Serializable

public class WikiChatEvent
extends WikiEvent

WikiChatEvent captures the information generated when a user activates the WikiChatPlugin. This includes username, timestamp (already available from WikiEvent), and the content of the user's text input.

Since:
2.3.92
Version:
$Id: WikiChatEvent.java,v 1.1 2007-06-15 12:08:17 altheim Exp $
Author:
Murray Altheim
See Also:
WikiEvent, Serialized Form

Field Summary
static int CHAT_EVENT
          The event type for an WikiChatEvent.
 
Fields inherited from class com.ecyrd.jspwiki.event.WikiEvent
ERROR, UNDEFINED
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
WikiChatEvent(Object source, Principal user, String pagename, String text)
          Constructs an instance of this event.
 
Method Summary
 void consume()
          Consumes this event so that it will not be processed in the default manner by the source which originated it.
 String getPageName()
          Returns the name of the origin page of this event.
 String getText()
          Returns the user text of this event.
 String getTypeDescription()
          Returns a human-readable description of this event's type.
 Principal getUser()
          Returns the Principal (current user) associated with this event.
 boolean isConsumed()
          Returns whether or not this event has been consumed.
 String toString()
          Returns a String representation of this event.
 
Methods inherited from class com.ecyrd.jspwiki.event.WikiEvent
eventName, getType, getWhen, isValidType, setType
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CHAT_EVENT

public static final int CHAT_EVENT
The event type for an WikiChatEvent.

See Also:
Constant Field Values
Constructor Detail

WikiChatEvent

public WikiChatEvent(Object source,
                     Principal user,
                     String pagename,
                     String text)
Constructs an instance of this event.

Parameters:
source - the Object that is the source of the event, usually an WikiChatPlugin
user - the Principal (user)
pagename - the wiki page name
text - the chat text
Method Detail

getUser

public Principal getUser()
Returns the Principal (current user) associated with this event.

Returns:
the Principal (current user) associated with this event.

getPageName

public String getPageName()
Returns the name of the origin page of this event.

Returns:
the name of the origin page of the event.

getText

public String getText()
Returns the user text of this event.

Returns:
the text of the event.

getTypeDescription

public String getTypeDescription()
Returns a human-readable description of this event's type.

Overrides:
getTypeDescription in class WikiEvent

consume

public void consume()
Consumes this event so that it will not be processed in the default manner by the source which originated it.


isConsumed

public boolean isConsumed()
Returns whether or not this event has been consumed.

See Also:
consume()

toString

public String toString()
Returns a String representation of this event.

Overrides:
toString in class WikiEvent


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.