org.barracudamvc.core.event
Interface BaseEvent

All Superinterfaces:
Cloneable, StateMap
All Known Implementing Classes:
ActionEvent, CancelLongRunningEvent, CheckLongRunningEvent, ControlEvent, DefaultBaseEvent, HttpRequestEvent, HttpResponseEvent, LongRunningEvent, RenderLongRunningEvent, RenderPage, ViewEvent

public interface BaseEvent
extends StateMap, Cloneable

This interface defines the methods needed to implement a BaseEvent


Field Summary
static String EVENT_ID
           
 
Method Summary
 void addListenerID(String id)
          Add a specific listener id this event should be delivered to.
 String getEventExtension()
          get the event extension
 String getEventID()
          Get the ID that identifies this event.
 String getEventIDWithExtension()
          Deprecated. csc010404_1; replaced by getEventURL()
 String getEventURL()
          Get the URL version of the event.
 List getListenerIDs()
          Get the list of id's this event is specifically targeted for.
 Map getParams()
          Get any associated params
 BaseEvent getRootEvent()
          get the root event source (may be null)
 Object getSource()
          get the event source (may be null)
 long getTimestamp()
          Get the timestamp
 boolean isHandled()
          get the handled status for the event
 void reset()
          Reset the event to it's default state
 void setEventExtension(String iext)
          set the event extension
 void setHandled(boolean val)
          mark the event as handled/unhandled
 void setParam(String key, String val)
          Set any associated params
 void setParam(String key, String[] val)
          Set any associated params
 void setSource(Object isource)
          set the source for an event
 void touch()
          Update the timestamp on the event
 
Methods inherited from interface org.barracudamvc.plankton.data.StateMap
clearState, getState, getStateKeys, getStateStore, putState, removeState
 

Field Detail

EVENT_ID

static final String EVENT_ID
See Also:
Constant Field Values
Method Detail

setSource

void setSource(Object isource)
set the source for an event

Parameters:
isource - the source for this event

getSource

Object getSource()
get the event source (may be null)

Returns:
the source for this event

getRootEvent

BaseEvent getRootEvent()
get the root event source (may be null)

Returns:
the root source for this event

setEventExtension

void setEventExtension(String iext)
set the event extension

Parameters:
iext - the target event extension

getEventExtension

String getEventExtension()
get the event extension

Returns:
the target event extension

setParam

void setParam(String key,
              String val)
Set any associated params


setParam

void setParam(String key,
              String[] val)
Set any associated params


getParams

Map getParams()
Get any associated params


setHandled

void setHandled(boolean val)
mark the event as handled/unhandled

Parameters:
val - true if the event is handled

isHandled

boolean isHandled()
get the handled status for the event

Returns:
true if the event is handled

addListenerID

void addListenerID(String id)
Add a specific listener id this event should be delivered to. Events can be targeted to more than one ID.

Parameters:
id - the Listener ID the event should target

getListenerIDs

List getListenerIDs()
Get the list of id's this event is specifically targeted for. May return null if there are none.

Returns:
a List of ID's this event is specifically targeting

getEventID

String getEventID()
Get the ID that identifies this event. This will typically be the class name.

Returns:
a string that uniquely identifies this event

getEventIDWithExtension

String getEventIDWithExtension()
Deprecated. csc010404_1; replaced by getEventURL()

Get the ID that identifies this event, along with the event extension


getEventURL

String getEventURL()
Get the URL version of the event. This method will also include any params associated with the event.

Returns:
the id and extension of this event

getTimestamp

long getTimestamp()
Get the timestamp

Returns:
the last time this event was touched

touch

void touch()
Update the timestamp on the event


reset

void reset()
Reset the event to it's default state



Copyright © 2006 BarracudaMVC.org All Rights Reserved.