lcanals.tc.web.event.plan
Class NewTaskEvent

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

public class NewTaskEvent
extends AbstractEventHandler

Event which adds a new task to the current plan. These parameters are needed within the request:


Takes from the session these attributes:
And from the ServletContext these ones:


Fields inherited from interface lcanals.tc.web.event.EventHandler
DEFAULT_EVENT, ERROR_EVENT
 
Constructor Summary
NewTaskEvent()
           
 
Method Summary
 void forward(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Redirects to the given URL or to an error parameters page.
 void process(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request)
          Creates a new task and inserts it into the user session object.
 
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

NewTaskEvent

public NewTaskEvent()
Method Detail

process

public void process(javax.servlet.ServletContext context,
                    javax.servlet.http.HttpServletRequest request)
             throws EventHandlerException
Creates a new task and inserts it into the user session object.
Throws:
EventHandlerException - when is no possible to process the request due to the lack of parameters or to incorrect values or no correct session.

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 to the given URL or to an error parameters page. If an error in parameters was be detected, response will be forwarded to an error page with explantions about the mistake. The URL of the error page must be present in URL.properties file with the name NEW_TASK_BAD_PARAMETERS
But if no problem was detected, forward to the URL given in the request parameter nextPage


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