lcanals.tc.web.event.plan
Class UpdateTaskEvent

java.lang.Object
  |
  +--lcanals.tc.web.event.AbstractEventHandler
        |
        +--lcanals.tc.web.event.plan.UpdateTaskEvent
All Implemented Interfaces:
EventHandler

public class UpdateTaskEvent
extends AbstractEventHandler

Updates a task with new signals. The next parameters are needed within the request:

If PLAY/PAUSE action is received, the content of the parameter comment will be added (if it isn't present, "No comments" is the default)


Fields inherited from interface lcanals.tc.web.event.EventHandler
DEFAULT_EVENT, ERROR_EVENT
 
Constructor Summary
UpdateTaskEvent()
           
 
Method Summary
 void forward(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Redirects the response to a specific view.
 void process(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request)
          Update the task into the plan within the user's session.
 
Methods inherited from class lcanals.tc.web.event.AbstractEventHandler
dispatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateTaskEvent

public UpdateTaskEvent()
Method Detail

process

public void process(javax.servlet.ServletContext context,
                    javax.servlet.http.HttpServletRequest request)
             throws EventHandlerException
Update the task into the plan within the user's session.
Throws:
EventHandlerException - when is no possible to process the request due to the lack of event or id parameters, or to incorrect values.

forward

public void forward(javax.servlet.ServletContext context,
                    javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws java.io.IOException,
                    javax.servlet.ServletException
Redirects the response to a specific view. Fills up the session/request/context with the suitable beans for the view.
URLs can be read from a file A recommended behaviour, when error occurs, could be take the error from the request (as an attribute) and redirect to an error view.


Luis F. Canals. Supported by www.sourceforge.net