|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.GenericServlet | +--javax.servlet.http.HttpServlet | +--com.instantbank.lettertemplate.editor.web.TemplateEditorServlet
Servlet acting as a controller in order to ask ejb services for letter's
template editor. Each method in this servlet has a corresponding one
--having the same name, but different parameters-- in the TemplateEditorProxy
class and
in the LetterTemplate
interface. Actual parameters in the TemplateEditorProxy methods are sent to
this servlet --in the request-- and must be explicitly extracted by the
corresponding methods in the servlet in order to be used as parameters for
the services specified in the LetterTemplate interface.
Field Summary | |
private Debug |
debug
The ubiquitous debug object. |
private java.util.Hashtable |
hashFields
A hash table with company fields information |
private LetterTemplate |
letejb
The ejb that provides the services for this servlet. |
private LetterTemplateHome |
lethome
The home for the ejb that provides the services requested by this servlet. |
Fields inherited from class javax.servlet.http.HttpServlet |
HEADER_IFMODSINCE, HEADER_LASTMOD, LSTRING_FILE, lStrings, METHOD_DELETE, METHOD_GET, METHOD_HEAD, METHOD_OPTIONS, METHOD_POST, METHOD_PUT, METHOD_TRACE |
Fields inherited from class javax.servlet.GenericServlet |
config |
Constructor Summary | |
TemplateEditorServlet()
|
Method Summary | |
private java.lang.String |
brokenVarNames(java.util.Set brokenVars)
Calculates a text containing a comma separated list of the names of variables in a Set. |
private void |
controlTimeout(java.io.ObjectOutputStream out,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Control time out in editor usecase: if timeout, inactivates the session and returns true if not timeout, reset timeout counter in lettertemplate and in Instantbank ear's and returns false. |
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Acts as a dispatcher for the services encoded as LetterOp constants. |
private void |
exit(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
java.lang.String url)
Exit from editor usecase for 2 possible reasons: user request or timeout |
private java.util.Set |
fixDateOffset(javax.servlet.http.HttpServletRequest req,
LetterComponent comp)
Brings to zero the inconsistent date offsets in a letter component. |
private java.util.Set |
fixDateOffset(javax.servlet.http.HttpServletRequest req,
Template template)
Brings to zero the inconsistent date offsets in a letter Template. |
void |
init()
Description of the Method |
private void |
loadCategories(java.lang.String companyId,
java.io.ObjectOutputStream out)
Loads all [code, description] of the categories in the current company, from the web context or from the database. |
private void |
loadCodesStamps(java.io.ObjectInputStream in,
java.io.ObjectOutputStream out)
Loads code and stamp of template and components. |
private void |
loadComponent(javax.servlet.http.HttpServletRequest req,
java.io.ObjectInputStream in,
java.io.ObjectOutputStream out)
Loads a letters component of the current company, corresponding to a code. |
private void |
loadComponentCode(java.io.ObjectInputStream in,
java.io.ObjectOutputStream out)
Loads the < code,stamp> of a component from the database. |
private void |
loadComponentsDescription(java.io.ObjectInputStream in,
java.io.ObjectOutputStream out)
Asks for code and description of the components, for a given component type and print type. |
private void |
loadImageRepository(java.io.ObjectInputStream in,
java.io.ObjectOutputStream out)
Asks the service of loading an image --of the current company-- after its name. |
private void |
loadImagesNamesRepository(java.lang.String companyId,
java.io.ObjectInputStream in,
java.io.ObjectOutputStream out)
Loads the names of the images from the web context or from the data base. |
private void |
loadTemplate(javax.servlet.http.HttpServletRequest req,
java.io.ObjectInputStream in,
java.io.ObjectOutputStream out)
Loads a letters template of the current company, corresponding to a code. |
private void |
loadTemplateCodes(java.io.ObjectInputStream in,
java.io.ObjectOutputStream out)
Asks for the service of loading < code, stamp> for a template and its components, after its code. |
private void |
loadTemplatesDescription(java.io.ObjectInputStream in,
java.io.ObjectOutputStream out)
Asks for code and description of the templates, for a given category and print type. |
private void |
loadVariableFormats(java.io.ObjectOutputStream out)
Asks to the LetterTemplate ejb for the service of loading variable formats. |
private void |
loadVariables(java.io.ObjectOutputStream out)
Asks to the LetterTemplate ejb for the service of loading loan variables. |
private void |
storeComponent(java.lang.String companyId,
java.io.ObjectInputStream in,
java.io.ObjectOutputStream out)
Asks for the service of storing a letter component without changing its links with any template. |
private void |
storeComponentAs(java.lang.String companyId,
java.io.ObjectInputStream in,
java.io.ObjectOutputStream out)
Asks for the service of storing a letter component bound to a template. |
private void |
storeTemplate(java.lang.String companyId,
java.io.ObjectInputStream in,
java.io.ObjectOutputStream out)
Asks for the service of storing a template. |
Methods inherited from class javax.servlet.http.HttpServlet |
|
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
Field Detail |
private LetterTemplateHome lethome
private LetterTemplate letejb
private java.util.Hashtable hashFields
private Debug debug
Constructor Detail |
public TemplateEditorServlet()
Method Detail |
public void init() throws javax.servlet.ServletException
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
- public void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, java.io.IOException
LetterOp
constants.doPost
in class javax.servlet.http.HttpServlet
req
- resp
- javax.servlet.ServletException
- java.io.IOException
- private void loadCategories(java.lang.String companyId, java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
companyId
- out
- javax.servlet.ServletException
- java.io.IOException
- private void loadCodesStamps(java.io.ObjectInputStream in, java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
in
- out
- javax.servlet.ServletException
- java.io.IOException
- private void loadTemplate(javax.servlet.http.HttpServletRequest req, java.io.ObjectInputStream in, java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
req
- The standard request objectin
- Communication channel from the servlet proxyout
- Communication channel to the servlet proxyjavax.servlet.ServletException
- java.io.IOException
- private void loadTemplatesDescription(java.io.ObjectInputStream in, java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
in
- out
- javax.servlet.ServletException
- java.io.IOException
- private void loadTemplateCodes(java.io.ObjectInputStream in, java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
in
- out
- javax.servlet.ServletException
- java.io.IOException
- private void storeTemplate(java.lang.String companyId, java.io.ObjectInputStream in, java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
companyId
- in
- out
- javax.servlet.ServletException
- java.io.IOException
- private void loadComponent(javax.servlet.http.HttpServletRequest req, java.io.ObjectInputStream in, java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
req
- The standard request objectin
- Communication channel from the servlet proxy.out
- Communication channel to the servlet proxy.javax.servlet.ServletException
- java.io.IOException
- private void loadComponentsDescription(java.io.ObjectInputStream in, java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
in
- out
- javax.servlet.ServletException
- java.io.IOException
- private void loadComponentCode(java.io.ObjectInputStream in, java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
in
- out
- javax.servlet.ServletException
- java.io.IOException
- private void storeComponent(java.lang.String companyId, java.io.ObjectInputStream in, java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
companyId
- in
- out
- javax.servlet.ServletException
- java.io.IOException
- private void storeComponentAs(java.lang.String companyId, java.io.ObjectInputStream in, java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
companyId
- in
- out
- javax.servlet.ServletException
- java.io.IOException
- private void loadImageRepository(java.io.ObjectInputStream in, java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
LetterTemplate.loadImageRepository(String)
in
- out
- javax.servlet.ServletException
- java.io.IOException
- private void loadImagesNamesRepository(java.lang.String companyId, java.io.ObjectInputStream in, java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
companyId
- in
- out
- javax.servlet.ServletException
- java.io.IOException
- private void loadVariables(java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
out
- javax.servlet.ServletException
- java.io.IOException
- private void loadVariableFormats(java.io.ObjectOutputStream out) throws javax.servlet.ServletException, java.io.IOException
out
- javax.servlet.ServletException
- java.io.IOException
- private void exit(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.String url) throws javax.servlet.ServletException, java.io.IOException
req
- The standard request parameterresp
- The standard response parameterurl
- Exit targetjavax.servlet.ServletException
- java.io.IOException
- private java.util.Set fixDateOffset(javax.servlet.http.HttpServletRequest req, LetterComponent comp) throws java.lang.Exception
comp
- The component to be fixed.req
- Description of the ParameterhashFields
attribute.java.lang.Exception
- Description of the Exceptionprivate java.util.Set fixDateOffset(javax.servlet.http.HttpServletRequest req, Template template) throws java.lang.Exception
template
- The template to be fixed.req
- Description of the ParameterfixDateOffset(HttpServletRequest,LetterComponent)
.java.lang.Exception
- Description of the Exceptionprivate java.lang.String brokenVarNames(java.util.Set brokenVars)
brokenVars
- a Set of var codes.private void controlTimeout(java.io.ObjectOutputStream out, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
out
- answer stream to editor appletrequest
- of web sessionresponse
- java.io.IOException
- javax.servlet.ServletException
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |