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:
- nextPage = internal identificator of the URL to be forwarded
- description
- difficulty
- risk
Takes from the session these attributes:
- plan = lcanals.tc.core.Plan with the current user's plan
- estimator = lcanals.tc.core.Estimator with user's estimator
And from the ServletContext these ones:
- factory = lcanals.tc.core.Factory object
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NewTaskEvent
public NewTaskEvent()
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