public abstract class AbstractProcessXDocReportServlet extends BaseXDocReportServlet implements XDocProcessServletConstants
CONVERTER_ID_HTTP_PARAM, DOWNLOAD_DISPATCH, DUMPER_KIND_HTTP_PARAM, FONT_ENCODING_HTTP_PARAM, REMOVE_DISPATCH, VIEW_DISPATCHDISPATCH_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 and Description |
|---|
AbstractProcessXDocReportServlet() |
| Modifier and Type | Method and Description |
|---|---|
IURIResolver |
createWEBURIResolver(IXDocReport report,
java.lang.String converterId,
javax.servlet.http.HttpServletRequest request)
Create the WEB
URIResolver used to manage image with XHTML converter. |
protected void |
doDocumentArchive(ProcessState state,
java.lang.String entryName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected boolean |
doGenerateReport(java.lang.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,
java.lang.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,
java.lang.Exception cause)
Invoked when there is an error thrown in any part of doRequest() processing.
|
protected java.lang.String |
getConverterId(IXDocReport report,
javax.servlet.http.HttpServletRequest request)
Returns the converter id.
|
protected java.lang.String |
getDumperKind(IXDocReport report,
javax.servlet.http.HttpServletRequest request)
Returns the dumper kind from the HTTP request.
|
protected FieldsMetadata |
getFieldsMetadata(java.lang.String reportId,
javax.servlet.http.HttpServletRequest request)
Returns the fields metadata to use for the report.
|
protected java.lang.String |
getFontEncoding(IXDocReport report,
java.lang.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 java.io.InputStream |
getSourceStream(java.lang.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(java.lang.String reportId,
javax.servlet.http.HttpServletRequest request)
Returns true if the original document "template" document with the given id must be cached and false otherwise.
|
protected boolean |
isCacheReport(java.lang.String reportId,
javax.servlet.http.HttpServletRequest request)
Returns true if the report with the given id must be cached and false otherwise.
|
protected boolean |
isGenerateContentDisposition(java.lang.String reportId,
MimeMapping mimeMapping,
javax.servlet.http.HttpServletRequest request) |
protected IXDocReport |
loadReport(java.lang.String reportId,
XDocReportRegistry registry,
javax.servlet.http.HttpServletRequest request)
Load report.
|
protected abstract void |
populateContext(IContext context,
java.lang.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,
java.lang.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).
|
clearRegistryFromHTTPSession, disableHTTPResponCache, doGet, doPost, getContentDisposition, getContentDisposition, getDispatchParameter, getEntryName, getProcessState, getRegistry, getRegistryFromHTTPSession, getReportId, getTemplateEngine, getTemplateEngine, getTemplateEngine, getTemplateEngineId, getTemplateEngineKind, getTemplateEngineKind, isDisableHTTPResponCache, prepareHTTPResponse, prepareHTTPResponsedoDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, servicepublic void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class BaseXDocReportServletjavax.servlet.ServletExceptionprotected void processRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
processRequest in class BaseXDocReportServletrequest - HttpServletRequest object containing client requestresponse - HttpServletResponse object for the responsejavax.servlet.ServletExceptionjava.io.IOExceptionprotected void doRemoveReport(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
request - response - java.io.IOExceptionprotected void doRedirectAfterRemoveReport(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
java.io.IOExceptionprotected void doDocumentArchive(ProcessState state, java.lang.String entryName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
java.io.IOExceptionjavax.servlet.ServletExceptionprotected void doSaveReport(ProcessState processState, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
processState - request - response - java.io.IOExceptionjavax.servlet.ServletExceptionprotected void doSaveEntry(ProcessState processState, java.lang.String entryName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
processState - request - response - java.io.IOExceptionjavax.servlet.ServletExceptionprotected boolean doGenerateReport(java.lang.String entryName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
javax.servlet.ServletExceptionjava.io.IOExceptionprotected IXDocReport getReport(javax.servlet.http.HttpServletRequest request) throws java.io.IOException, XDocReportException
request - java.io.IOExceptionXDocReportExceptionprotected IXDocReport loadReport(java.lang.String reportId, XDocReportRegistry registry, javax.servlet.http.HttpServletRequest request) throws java.io.IOException, XDocReportException
reportId - registry - request - java.io.IOExceptionXDocReportExceptionprotected boolean isCacheReport(java.lang.String reportId,
javax.servlet.http.HttpServletRequest request)
reportId - the report id.request - the HTTP request.protected boolean isCacheOriginalDocument(java.lang.String reportId,
javax.servlet.http.HttpServletRequest request)
reportId - the report id.request - the HTTP request.protected FieldsMetadata getFieldsMetadata(java.lang.String reportId, javax.servlet.http.HttpServletRequest request)
reportId - the report id.request - the HTTP request.protected void error(IXDocReport report, IContext context, DumperOptions dumperOptions, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Exception cause) throws javax.servlet.ServletException, java.io.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.ServletExceptionjava.io.IOExceptionprotected java.lang.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, java.lang.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, java.lang.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 java.lang.String getDumperKind(IXDocReport report, javax.servlet.http.HttpServletRequest request)
report - the report.request - the HTTP request.protected java.lang.String getFontEncoding(IXDocReport report, java.lang.String converterId, javax.servlet.http.HttpServletRequest request)
request - protected boolean isGenerateContentDisposition(java.lang.String reportId,
MimeMapping mimeMapping,
javax.servlet.http.HttpServletRequest request)
isGenerateContentDisposition in class BaseXDocReportServletprotected abstract java.io.InputStream getSourceStream(java.lang.String reportId,
javax.servlet.http.HttpServletRequest request)
throws java.io.IOException,
XDocReportException
reportId.reportId - report id.request - Http servlet request context.java.io.IOExceptionXDocReportExceptionprotected abstract void populateContext(IContext context, java.lang.String reportId, javax.servlet.http.HttpServletRequest request) throws java.io.IOException, XDocReportException
reportId.context - XDocReport context to register Java data model.reportId - report id.request - Http servlet request context.java.io.IOExceptionXDocReportExceptionCopyright © 2022. All Rights Reserved.