com.instantbank.lettertemplate.control.web.handlers
Class TemplatesHandler
java.lang.Object
|
+--com.instantbank.lettertemplate.control.web.handlers.RequestHandlerSupport
|
+--com.instantbank.lettertemplate.control.web.handlers.TemplatesHandler
- All Implemented Interfaces:
- RequestHandler
- public class TemplatesHandler
- extends RequestHandlerSupport
Letter Templates usecase: handler of user requests in the Application layer
- Author:
- Instant-bank (Jorge Cardenas)
Method Summary |
private LetterTemplateEvent |
createListTemplatesEvent(javax.servlet.http.HttpServletRequest request)
method for instantiating a TemplatesEvent demanding a service of getting
the templates list |
private LetterTemplateEvent |
createUpdateTemplatesEvent(javax.servlet.http.HttpServletRequest request)
method for instantiating a TemplatesEvent demanding a service of updating
several letters templates |
private java.util.ArrayList |
parseXMLTemplates(java.lang.String templateItems)
auxiliary method for parsing a XML string containing items to update in
letters templates |
LetterTemplateEvent |
processRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context)
principal method that process a user request instantiating a TemplatesEvent
with the user request data |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
debug
private Debug debug
context
javax.servlet.ServletContext context
gotoDB
private boolean gotoDB
TemplatesHandler
public TemplatesHandler()
processRequest
public LetterTemplateEvent processRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context)
throws LetterTemplateEventException
- principal method that process a user request instantiating a TemplatesEvent
with the user request data
- Parameters:
request
- of MainServletcontext
- of MainServlet- Returns:
- TemplatesEvent with the user request data
- Throws:
LetterTemplateEventException
-
createListTemplatesEvent
private LetterTemplateEvent createListTemplatesEvent(javax.servlet.http.HttpServletRequest request)
throws LetterTemplateEventException
- method for instantiating a TemplatesEvent demanding a service of getting
the templates list
- Parameters:
request
- of MainServlet- Returns:
- TemplatesEvent with the user request data
- Throws:
LetterTemplateEventException
-
createUpdateTemplatesEvent
private LetterTemplateEvent createUpdateTemplatesEvent(javax.servlet.http.HttpServletRequest request)
throws LetterTemplateEventException
- method for instantiating a TemplatesEvent demanding a service of updating
several letters templates
- Parameters:
request
- of MainServlet- Returns:
- TemplatesEvent with the user request data
- Throws:
LetterTemplateEventException
-
parseXMLTemplates
private java.util.ArrayList parseXMLTemplates(java.lang.String templateItems)
throws java.lang.Exception
- auxiliary method for parsing a XML string containing items to update in
letters templates
- Parameters:
templateItems
- is the XML string- Returns:
- a ArrayList with 4 elements of type String[]
representing the attributes of items: code of template, code of
category, name and status
- Throws:
java.lang.Exception
-