com.ingenta.clownbike
Interface TaskStep

All Known Implementing Classes:
SimpleTaskStep

public interface TaskStep

Each task is performed by one or more steps. (Each task even of the same class need not have the same number of steps in each instance.)


Method Summary
 void completed(DatabaseTransaction transaction)
          Completes the step.
 void doGet(DatabaseTransaction transaction, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Called when the step needs to be viewed.
 void doPost(DatabaseTransaction transaction, MultipartHttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Called when the user has changed the presentation via the template.
 Task getTask()
          Returns the task associated with this step.
 void setTask(Task task)
          Sets the task associated with this step.
 void started(DatabaseTransaction transaction)
          Starts the step.
 

Method Detail

getTask

public Task getTask()
Returns the task associated with this step.


setTask

public void setTask(Task task)
Sets the task associated with this step.


started

public void started(DatabaseTransaction transaction)
             throws DatabaseException,
                    TaskException
Starts the step. A step may be restarted any number of times. If the step has been completed then both the start and the completed dates are reset. Zero or more of a task's may be active at any one time.

Throws:
DatabaseException
TaskException

completed

public void completed(DatabaseTransaction transaction)
               throws DatabaseException,
                      TaskException
Completes the step. A step may be completed any number of times but must be started before each completion. Throws an illegal state expection if the step is inactive.

Throws:
DatabaseException
TaskException

doPost

public void doPost(DatabaseTransaction transaction,
                   MultipartHttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws DatabaseException,
                   TaskException
Called when the user has changed the presentation via the template. This method typically gets one or more paramater data from the request and passes this data onto the task.

Throws:
DatabaseException
TaskException

doGet

public void doGet(DatabaseTransaction transaction,
                  javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws DatabaseException,
                  TaskException
Called when the step needs to be viewed. Nothing needs to be done is the template handles everything. However, this method typically sets one or more attributes on the request for use by the template.

Throws:
DatabaseException
TaskException