net.sf.jagzilla.actions
Interface EventAction

All Superinterfaces:
java.lang.Runnable
All Known Implementing Classes:
BugModifiedAction, DummyAction

public interface EventAction
extends java.lang.Runnable

generic interface for event actions. This interface defines methods invoked on jagzilla actions.
A jagzilla action is a class that is configured to be executed on certaing events on jagzilla. This interface extends the Runnable interface, since it is the run method which is invoked to mainly execute the action.
When jagzilla is about to run an action (because it is configured to do so in events.properties) it will invoke the methods setBugQuery and setSystemQuery on the class. This is to facilitate the operation on jagzilla to the event being implemented, in this way implementors of events do not need to know how to configure the runinning instance of jagzilla, since it receives a usable instance. Be aware of calling the same method that fires the event you are writing, since that would create a nice stack overflow.
Finally the setProperty can be invoked many times, this method is to inform the event of data related to the event, the properties received by the event depend on the event being executed.

Author:
Miguel Griffa

Method Summary
 void setBugQuery(BugQuery bq)
          sets the BugQuery to the implementing action.
 void setProperty(java.lang.String name, java.lang.Object value)
          adds a property to the event action.
 void setSystemQuery(SystemQuery sq)
          sets the SystemQuery to the implementing action.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
adds a property to the event action. This method may be called more than one or never, depending on the event type.

Parameters:
name - the property name
value - the value of the property

setBugQuery

public void setBugQuery(BugQuery bq)
sets the BugQuery to the implementing action. This method can be safely ignored, the object is given to the action in case the action needs to use it.

Parameters:
bq - a configured and usable BugQuery

setSystemQuery

public void setSystemQuery(SystemQuery sq)
sets the SystemQuery to the implementing action. This method can be safely ignored, the object is given to the action in case the action needs to use it.

Parameters:
sq - a configured and usable SystemQuery


Distributed under the GPL. By Miguel Griffa. See the Jagzilla project page for more info.