public abstract class AbstractRTFTemplateServlet
extends javax.servlet.http.HttpServlet
| Modifier and Type | Field and Description |
|---|---|
static String |
RTF_CONTENT_TYPE |
| Constructor and Description |
|---|
AbstractRTFTemplateServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
cacheWithKey(javax.servlet.http.HttpServletRequest request) |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles HTTP
GET requests by calling #doRequest(). |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles HTTP
POST requests by calling #doRequest(). |
protected void |
doRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles all requests (by default).
|
protected void |
error(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Exception cause)
Invoked when there is an error thrown in any part of doRequest() processing.
|
protected org.springframework.context.ApplicationContext |
getApplicationContext(javax.servlet.http.HttpServletRequest request)
Return Spring configuration for RTFTemplate
|
protected String |
getFileNameOfContentDisposition(javax.servlet.http.HttpServletRequest request) |
protected org.springframework.context.ApplicationContext |
getGlobalApplicationContext()
Return global Spring configuration for RTFTemplate
|
protected int |
getGroupByPerPageBreak(javax.servlet.http.HttpServletRequest request) |
protected String |
getRealPathOfRTFModel(javax.servlet.http.HttpServletRequest request,
String rtfModelFile)
Return the real path of RTF Model.
|
protected InputStream |
getRTFInputStream(javax.servlet.http.HttpServletRequest request)
This method to implement must return InputStream of the RTF model source to use.
|
protected Reader |
getRTFReader(javax.servlet.http.HttpServletRequest request)
This method to implement must return Reader of the RTF model source to use.
|
protected String |
getRTFTemplateImpl(javax.servlet.http.HttpServletRequest request) |
protected InputStream |
getTransformerConfig(javax.servlet.http.HttpServletRequest request)
If this method is implemented, RTFTemplate use this TransformerConfig,
oterwise, RTFTemplate use default TransformerConfig.
|
protected abstract InputStream |
getXMLFieldsAvailable(javax.servlet.http.HttpServletRequest request)
This method to implement must return XML fileds available for the RTF model or null if there is not XML Fileds available.
|
void |
init() |
protected abstract void |
putContext(javax.servlet.http.HttpServletRequest request,
IContext ctx)
This method to implement must put context for the RTF model source to use.
|
protected void |
putDefaultFormat(javax.servlet.http.HttpServletRequest request,
RTFTemplate rtfTemplate) |
protected void |
putGlobalContext(javax.servlet.http.HttpServletRequest request,
IContext newContext) |
protected void |
setContentDisposition(javax.servlet.http.HttpServletResponse response,
String fileName)
Set FileName of Content Disposition
|
protected void |
setContentType(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Set content type to RTF.
|
protected String |
unCacheWithKey(javax.servlet.http.HttpServletRequest request) |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, servicepublic static final String RTF_CONTENT_TYPE
public void init()
init in class javax.servlet.GenericServletpublic void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
GET requests by calling #doRequest().doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionpublic void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
POST requests by calling #doRequest().doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
request - HttpServletRequest object containing client requestresponse - HttpServletResponse object for the responsejavax.servlet.ServletExceptionIOExceptionprotected void error(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Exception cause)
throws javax.servlet.ServletException,
IOException
request - original HttpServletRequest from servlet container.response - HttpServletResponse object from servlet container.cause - Exception that was thrown by some other part of process.javax.servlet.ServletExceptionIOExceptionprotected void setContentType(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
request - response - protected void setContentDisposition(javax.servlet.http.HttpServletResponse response,
String fileName)
response - fileName - protected Reader getRTFReader(javax.servlet.http.HttpServletRequest request) throws Exception
request - Exceptionprotected InputStream getRTFInputStream(javax.servlet.http.HttpServletRequest request) throws Exception
request - Exceptionprotected abstract void putContext(javax.servlet.http.HttpServletRequest request,
IContext ctx)
throws Exception
request - response - ctx - Exceptionprotected abstract InputStream getXMLFieldsAvailable(javax.servlet.http.HttpServletRequest request) throws Exception
request - response - Exceptionprotected InputStream getTransformerConfig(javax.servlet.http.HttpServletRequest request)
protected String getRealPathOfRTFModel(javax.servlet.http.HttpServletRequest request, String rtfModelFile)
request - rtfModelFile - protected String getFileNameOfContentDisposition(javax.servlet.http.HttpServletRequest request)
protected String getRTFTemplateImpl(javax.servlet.http.HttpServletRequest request)
protected void putDefaultFormat(javax.servlet.http.HttpServletRequest request,
RTFTemplate rtfTemplate)
protected void putGlobalContext(javax.servlet.http.HttpServletRequest request,
IContext newContext)
protected int getGroupByPerPageBreak(javax.servlet.http.HttpServletRequest request)
protected String cacheWithKey(javax.servlet.http.HttpServletRequest request)
protected String unCacheWithKey(javax.servlet.http.HttpServletRequest request)
protected org.springframework.context.ApplicationContext getGlobalApplicationContext()
protected org.springframework.context.ApplicationContext getApplicationContext(javax.servlet.http.HttpServletRequest request)
Copyright © 2020 Mice S.r.l. All rights reserved.