|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet fr.opensagres.xdocreport.document.web.BaseXDocReportServlet fr.opensagres.xdocreport.document.web.AbstractProcessXDocReportServlet
public abstract class AbstractProcessXDocReportServlet
Abstract XDoc Report servlet used to process report (generate report and remove report from cache).
Field Summary |
---|
Fields inherited from interface fr.opensagres.xdocreport.document.web.XDocProcessServletConstants |
---|
CONVERTER_ID_HTTP_PARAM, DOWNLOAD_DISPATCH, DUMPER_KIND_HTTP_PARAM, FONT_ENCODING_HTTP_PARAM, REMOVE_DISPATCH, VIEW_DISPATCH |
Fields inherited from interface fr.opensagres.xdocreport.document.web.XDocBaseServletConstants |
---|
DISPATCH_HTTP_PARAM, ENTRY_NAME_HTTP_PARAM, PROCESS_STATE_HTTP_PARAM, REPORT_ID_HTTP_PARAM, TEMPLATE_ENGINE_ID_HTTP_PARAM, TEMPLATE_ENGINE_KIND_HTTP_PARAM, XDOCREPORT_ATTR_KEY, XDOCREPORTREGISTRY_SESSION_KEY |
Constructor Summary | |
---|---|
AbstractProcessXDocReportServlet()
|
Method Summary | |
---|---|
IURIResolver |
createWEBURIResolver(IXDocReport report,
String converterId,
javax.servlet.http.HttpServletRequest request)
Create the WEB URIResolver used to manage image with XHTML converter. |
protected void |
doDocumentArchive(ProcessState state,
String entryName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected boolean |
doGenerateReport(String entryName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
doRedirectAfterRemoveReport(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
doRemoveReport(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Remove report from the registry. |
protected void |
doSaveEntry(ProcessState processState,
String entryName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Extract entry from a report. |
protected void |
doSaveReport(ProcessState processState,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Save document archive of the report. |
protected void |
error(IXDocReport report,
IContext context,
DumperOptions dumperOptions,
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 String |
getConverterId(IXDocReport report,
javax.servlet.http.HttpServletRequest request)
Returns the converter id. |
protected String |
getDumperKind(IXDocReport report,
javax.servlet.http.HttpServletRequest request)
Returns the dumper kind from the HTTP request. |
protected FieldsMetadata |
getFieldsMetadata(String reportId,
javax.servlet.http.HttpServletRequest request)
|
protected String |
getFontEncoding(IXDocReport report,
String converterId,
javax.servlet.http.HttpServletRequest request)
Returns the encoding to use for converter. |
protected Options |
getOptionsConverter(IXDocReport report,
javax.servlet.http.HttpServletRequest request)
Returns the options for the converter. |
protected DumperOptions |
getOptionsDumper(IXDocReport report,
javax.servlet.http.HttpServletRequest request)
Returns the dumper options from the HTTP request and null otherwise. |
protected IXDocReport |
getReport(javax.servlet.http.HttpServletRequest request)
|
protected abstract InputStream |
getSourceStream(String reportId,
javax.servlet.http.HttpServletRequest request)
Returns input stream of the report to load identified with reportId . |
void |
init(javax.servlet.ServletConfig config)
|
protected boolean |
isCacheOriginalDocument(String reportId,
javax.servlet.http.HttpServletRequest request)
|
protected boolean |
isGenerateContentDisposition(String reportId,
MimeMapping mimeMapping,
javax.servlet.http.HttpServletRequest request)
|
protected IXDocReport |
loadReport(String reportId,
XDocReportRegistry registry,
javax.servlet.http.HttpServletRequest request)
Load report. |
protected abstract void |
populateContext(IContext context,
String reportId,
javax.servlet.http.HttpServletRequest request)
Put the Java model in the context for the report reportId . |
protected void |
prepareOptions(Options options,
IXDocReport report,
String converterId,
javax.servlet.http.HttpServletRequest request)
Initialize converter options with default settings. |
protected void |
processRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles all requests (by default). |
Methods inherited from class fr.opensagres.xdocreport.document.web.BaseXDocReportServlet |
---|
clearRegistryFromHTTPSession, disableHTTPResponCache, doGet, doPost, getContentDisposition, getContentDisposition, getDispatchParameter, getEntryName, getProcessState, getRegistry, getRegistryFromHTTPSession, getReportId, getTemplateEngine, getTemplateEngine, getTemplateEngine, getTemplateEngineId, getTemplateEngineKind, getTemplateEngineKind, isDisableHTTPResponCache, prepareHTTPResponse, prepareHTTPResponse |
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 |
Constructor Detail |
---|
public AbstractProcessXDocReportServlet()
Method Detail |
---|
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class BaseXDocReportServlet
javax.servlet.ServletException
protected void processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
processRequest
in class BaseXDocReportServlet
request
- HttpServletRequest object containing client requestresponse
- HttpServletResponse object for the response
javax.servlet.ServletException
IOException
protected void doRemoveReport(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
request
- response
-
IOException
protected void doRedirectAfterRemoveReport(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
protected void doDocumentArchive(ProcessState state, String entryName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
protected void doSaveReport(ProcessState processState, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
processState
- request
- response
-
IOException
javax.servlet.ServletException
protected void doSaveEntry(ProcessState processState, String entryName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
processState
- request
- response
-
IOException
javax.servlet.ServletException
protected boolean doGenerateReport(String entryName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
protected IXDocReport getReport(javax.servlet.http.HttpServletRequest request) throws IOException, XDocReportException
request
-
IOException
XDocReportException
protected IXDocReport loadReport(String reportId, XDocReportRegistry registry, javax.servlet.http.HttpServletRequest request) throws IOException, XDocReportException
reportId
- registry
- request
-
IOException
XDocReportException
protected boolean isCacheOriginalDocument(String reportId, javax.servlet.http.HttpServletRequest request)
protected FieldsMetadata getFieldsMetadata(String reportId, javax.servlet.http.HttpServletRequest request)
protected void error(IXDocReport report, IContext context, DumperOptions dumperOptions, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Exception cause) throws javax.servlet.ServletException, IOException
dumperOptions
- context
- report
- 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
IOException
protected String getConverterId(IXDocReport report, javax.servlet.http.HttpServletRequest request)
request
-
protected Options getOptionsConverter(IXDocReport report, javax.servlet.http.HttpServletRequest request)
report
- the report.request
- the HTTP request.
protected void prepareOptions(Options options, IXDocReport report, String converterId, javax.servlet.http.HttpServletRequest request)
options
- the options converter.report
- the report.converterId
- the converter id.request
- the HTTP request.public IURIResolver createWEBURIResolver(IXDocReport report, String converterId, javax.servlet.http.HttpServletRequest request)
URIResolver
used to manage image with XHTML converter.
report
- the report.converterId
- the converter id.request
- the HTTP request.
protected DumperOptions getOptionsDumper(IXDocReport report, javax.servlet.http.HttpServletRequest request)
report
- the report.request
- the HTTP request.
protected String getDumperKind(IXDocReport report, javax.servlet.http.HttpServletRequest request)
report
- the report.request
- the HTTP request.
protected String getFontEncoding(IXDocReport report, String converterId, javax.servlet.http.HttpServletRequest request)
request
-
protected boolean isGenerateContentDisposition(String reportId, MimeMapping mimeMapping, javax.servlet.http.HttpServletRequest request)
isGenerateContentDisposition
in class BaseXDocReportServlet
protected abstract InputStream getSourceStream(String reportId, javax.servlet.http.HttpServletRequest request) throws IOException, XDocReportException
reportId
.
reportId
- report id.request
- Http servlet request context.
IOException
XDocReportException
protected abstract void populateContext(IContext context, String reportId, javax.servlet.http.HttpServletRequest request) throws IOException, XDocReportException
reportId
.
context
- XDocReport context to register Java data model.reportId
- report id.request
- Http servlet request context.
IOException
XDocReportException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |