org.enhydra.barracuda.core.event
Interface BaseEvent

All Superinterfaces:
Cloneable, StateMap
All Known Implementing Classes:
DefaultBaseEvent

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.enhydra.barracuda.plankton.data.StateMap
clearState, getState, getStateKeys, getStateValues, putState, removeState
 

Field Detail

EVENT_ID

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

setSource

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

Parameters:
isource - the source for this event

getSource

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

Returns:
the source for this event

getRootEvent

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

Returns:
the root source for this event

setEventExtension

public void setEventExtension(String iext)
set the event extension

Parameters:
iext - the target event extension

getEventExtension

public String getEventExtension()
get the event extension

Returns:
the target event extension

setParam

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


setParam

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


getParams

public Map getParams()
Get any associated params


setHandled

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

Parameters:
val - true if the event is handled

isHandled

public boolean isHandled()
get the handled status for the event

Returns:
true if the event is handled

addListenerID

public 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

public 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

public 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

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

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


getEventURL

public 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

public long getTimestamp()
Get the timestamp

Returns:
the last time this event was touched

touch

public void touch()
Update the timestamp on the event


reset

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



Copyright © 2003 BarracudaMVC.org All Rights Reserved.