|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
net.sourceforge.rtf.web.servlet.AbstractRTFTemplateServlet
public abstract class AbstractRTFTemplateServlet
Abstract class RTFTemplate servlet to manage RTFTEmplate with Web Application. Method to implement are :
| Field Summary | |
|---|---|
static java.lang.String |
RTF_CONTENT_TYPE
|
| Constructor Summary | |
|---|---|
AbstractRTFTemplateServlet()
|
|
| Method Summary | |
|---|---|
protected java.lang.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,
java.lang.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 java.lang.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 java.lang.String |
getRealPathOfRTFModel(javax.servlet.http.HttpServletRequest request,
java.lang.String rtfModelFile)
Return the real path of RTF Model. |
protected java.io.InputStream |
getRTFInputStream(javax.servlet.http.HttpServletRequest request)
This method to implement must return InputStream of the RTF model source to use. |
protected java.io.Reader |
getRTFReader(javax.servlet.http.HttpServletRequest request)
This method to implement must return Reader of the RTF model source to use. |
protected java.lang.String |
getRTFTemplateImpl(javax.servlet.http.HttpServletRequest request)
|
protected java.io.InputStream |
getTransformerConfig(javax.servlet.http.HttpServletRequest request)
If this method is implemented, RTFTemplate use this TransformerConfig, oterwise, RTFTemplate use default TransformerConfig. |
protected abstract java.io.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,
java.lang.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 java.lang.String |
unCacheWithKey(javax.servlet.http.HttpServletRequest request)
|
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| 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, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String RTF_CONTENT_TYPE
| Constructor Detail |
|---|
public AbstractRTFTemplateServlet()
| Method Detail |
|---|
public void init()
init in class javax.servlet.GenericServlet
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
GET requests by calling #doRequest().
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletException
java.io.IOException
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
POST requests by calling #doRequest().
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletException
java.io.IOException
protected void doRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
request - HttpServletRequest object containing client requestresponse - HttpServletResponse object for the response
javax.servlet.ServletException
java.io.IOException
protected void error(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Exception cause)
throws javax.servlet.ServletException,
java.io.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.ServletException
java.io.IOException
protected void setContentType(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
request - response -
protected void setContentDisposition(javax.servlet.http.HttpServletResponse response,
java.lang.String fileName)
response - fileName -
protected java.io.Reader getRTFReader(javax.servlet.http.HttpServletRequest request)
throws java.lang.Exception
request -
java.lang.Exception
protected java.io.InputStream getRTFInputStream(javax.servlet.http.HttpServletRequest request)
throws java.lang.Exception
request -
java.lang.Exception
protected abstract void putContext(javax.servlet.http.HttpServletRequest request,
IContext ctx)
throws java.lang.Exception
request - response - ctx -
java.lang.Exception
protected abstract java.io.InputStream getXMLFieldsAvailable(javax.servlet.http.HttpServletRequest request)
throws java.lang.Exception
request - response -
java.lang.Exceptionprotected java.io.InputStream getTransformerConfig(javax.servlet.http.HttpServletRequest request)
protected java.lang.String getRealPathOfRTFModel(javax.servlet.http.HttpServletRequest request,
java.lang.String rtfModelFile)
request - rtfModelFile -
protected java.lang.String getFileNameOfContentDisposition(javax.servlet.http.HttpServletRequest request)
protected java.lang.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 java.lang.String cacheWithKey(javax.servlet.http.HttpServletRequest request)
protected java.lang.String unCacheWithKey(javax.servlet.http.HttpServletRequest request)
protected org.springframework.context.ApplicationContext getGlobalApplicationContext()
protected org.springframework.context.ApplicationContext getApplicationContext(javax.servlet.http.HttpServletRequest request)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||