|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.ix.jspTutorial.controller.RequestProcessor
This class processes all requests recived from the applications main entry point and generates all depending and necessary events
Field Summary | |
private javax.servlet.http.HttpSession |
httpSession
current session of user |
private javax.servlet.ServletContext |
myApplication
the application |
private ModelManager |
pizzaModelManager
main manager for all models |
static java.lang.String |
vcid
version of the source |
Fields inherited from interface de.ix.jspTutorial.constants.RequestParameterConstants |
CUS_ADDRESS1,
CUS_ADDRESS2,
CUS_EMAIL,
CUS_FIRSTNAME,
CUS_ID,
CUS_LASTNAME,
CUS_TOWN,
CUS_ZIP,
DO_ACTION,
DO_CHOICE,
DO_CHOICE_PARAMS,
DO_LOGIN,
DO_LOGIN_PARAMS,
DO_LOGOUT,
DO_ORDER,
DO_ORDER_PARAMS,
ERROR,
INGREDIENT_IDS,
MIP_ERROR,
PIZZA_ID,
REQUESTED_URL,
SHOW_CHOICE,
SHOW_LOGIN |
Fields inherited from interface de.ix.jspTutorial.constants.MailConstants |
C_CONFIG_MAIL_DEBUG,
C_CONFIG_MAIL_RECIPIENT,
C_CONFIG_MAIL_SMTP_HOST,
C_CONFIG_USE_EMAIL,
MAIL_DEBUG,
MAIL_RECIPIENT,
MAIL_SMTP_HOST,
USE_EMAIL |
Constructor Summary | |
RequestProcessor()
|
Method Summary | |
void |
checkParameters(java.lang.String action,
javax.servlet.http.HttpServletRequest request)
Method to check all given parameters depending on the current request type. |
boolean |
getMailDebug()
Is Mail debug. |
java.lang.String |
getMailRecipient()
get Mail Recipient You can it config at web.xml as ServletContext Init parameter "MAIL_RECIPIENT" |
java.lang.String |
getMailSmtpHost()
get Mail Smtp Host You can it config at web.xml as ServletContext Init parameter "MAIL_SMTP_HOST" |
boolean |
getUseEMail()
Is Use Email order. |
void |
handleChoiseEvent(javax.servlet.http.HttpServletRequest request)
Handler-method for choice request. |
void |
handleEvent(java.lang.String action,
javax.servlet.http.HttpServletRequest request)
Method to delegate the differnt request types to specialized handler-method. |
void |
handleLoginEvent(javax.servlet.http.HttpServletRequest request)
Handler-method for login request. |
void |
handleLogoutEvent(javax.servlet.http.HttpServletRequest request)
Handler-method for logout request. |
void |
handleOrderEvent(javax.servlet.http.HttpServletRequest request)
Handler-method for order request. |
void |
init(javax.servlet.ServletContext servletContext,
javax.servlet.http.HttpSession httpSession)
This method initializes all private attributes of the the given RequestProcessor instance |
void |
log(java.lang.String msg)
Output of a message to the servlet log of the container. |
void |
log(java.lang.String message,
java.lang.Throwable throwable)
Put the given message and exception the servlet log of the container. |
void |
processRequest(javax.servlet.http.HttpServletRequest request)
This method proceesses the actual http request. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static java.lang.String vcid
private javax.servlet.http.HttpSession httpSession
private javax.servlet.ServletContext myApplication
private ModelManager pizzaModelManager
Constructor Detail |
public RequestProcessor()
Method Detail |
public void init(javax.servlet.ServletContext servletContext, javax.servlet.http.HttpSession httpSession)
RequestProcessor
instanceservletContext
- actual Servlet ContexthttpSession
- actual HTTP Sessionpublic void processRequest(javax.servlet.http.HttpServletRequest request) throws de.ix.jspTutorial.exception.MissingInputParamsException
request
- actual HttpServletRequestpublic void handleLogoutEvent(javax.servlet.http.HttpServletRequest request)
request
- Current httpRequestpublic void handleLoginEvent(javax.servlet.http.HttpServletRequest request)
request
- Current httpRequestpublic void handleChoiseEvent(javax.servlet.http.HttpServletRequest request)
PersonalPizza
with the help of the current request.request
- Current httpRequestpublic void handleOrderEvent(javax.servlet.http.HttpServletRequest request)
request
- Current httpRequestpublic void handleEvent(java.lang.String action, javax.servlet.http.HttpServletRequest request)
action
- Current request typerequest
- Current httpRequestpublic void checkParameters(java.lang.String action, javax.servlet.http.HttpServletRequest request) throws de.ix.jspTutorial.exception.MissingInputParamsException
action
- Current request typerequest
- Current httpRequestpublic void log(java.lang.String msg)
msg
- The messagepublic void log(java.lang.String message, java.lang.Throwable throwable)
message
- Error messagethrowable
- Exceptionpublic boolean getUseEMail()
public boolean getMailDebug()
public java.lang.String getMailRecipient()
public java.lang.String getMailSmtpHost()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |