lcanals.tc.web.event.plan
Class ShowPlanEvent

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

public class ShowPlanEvent
extends AbstractEventHandler

Shows the plan for the given user reading data from a file. Reads the URLs from the URL.properties file, and, particulary, the SHOW_PLAN url.
These attributes are needed within the session


If no plan is found, a plan will be obtained for the current user using the factory specified in the ServletContext with name factory.

Author:
www.lfcanals.es.org

Fields inherited from interface lcanals.tc.web.event.EventHandler
DEFAULT_EVENT, ERROR_EVENT
 
Constructor Summary
ShowPlanEvent()
           
 
Method Summary
 void forward(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Forward to SHOW_PLAN url
 void process(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request)
          Shows the current user's plan.
 
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

ShowPlanEvent

public ShowPlanEvent()
Method Detail

process

public void process(javax.servlet.ServletContext context,
                    javax.servlet.http.HttpServletRequest request)
             throws EventHandlerException
Shows the current user's plan. If plan is not present in user session, takes it from a file and stores into the session, with the name plan.
If no session is present for this request, new session is created and current plan and user's estimator are set into it .
If there is session but no plan for this session, takes current user's plan and set it into session
Following copied from interface: lcanals.tc.web.event.EventHandler
Throws:
EventHandlerException - when is no possible to process the request (usually due to crack intends)

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
Forward to SHOW_PLAN url


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