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,
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)
Returns the fields metadata to use for the report.
|
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)
Returns true if the original document "template" document with the given id must be cached and false otherwise.
|
protected boolean |
isCacheReport(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(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).
|
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,
IOException
processRequest in class BaseXDocReportServletrequest - HttpServletRequest object containing client requestresponse - HttpServletResponse object for the responsejavax.servlet.ServletExceptionIOExceptionprotected void doRemoveReport(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
request - response - IOExceptionprotected void doRedirectAfterRemoveReport(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
IOExceptionprotected void doDocumentArchive(ProcessState state, String entryName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionprotected void doSaveReport(ProcessState processState, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
processState - request - response - IOExceptionjavax.servlet.ServletExceptionprotected void doSaveEntry(ProcessState processState, String entryName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
processState - request - response - IOExceptionjavax.servlet.ServletExceptionprotected boolean doGenerateReport(String entryName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
javax.servlet.ServletExceptionIOExceptionprotected IXDocReport getReport(javax.servlet.http.HttpServletRequest request) throws IOException, XDocReportException
request - IOExceptionXDocReportExceptionprotected IXDocReport loadReport(String reportId, XDocReportRegistry registry, javax.servlet.http.HttpServletRequest request) throws IOException, XDocReportException
reportId - registry - request - IOExceptionXDocReportExceptionprotected boolean isCacheReport(String reportId, javax.servlet.http.HttpServletRequest request)
reportId - the report id.request - the HTTP request.protected boolean isCacheOriginalDocument(String reportId, javax.servlet.http.HttpServletRequest request)
reportId - the report id.request - the HTTP request.protected FieldsMetadata getFieldsMetadata(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, 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.ServletExceptionIOExceptionprotected 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 BaseXDocReportServletprotected abstract InputStream getSourceStream(String reportId, javax.servlet.http.HttpServletRequest request) throws IOException, XDocReportException
reportId.reportId - report id.request - Http servlet request context.IOExceptionXDocReportExceptionprotected 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.IOExceptionXDocReportExceptionCopyright © 2015. All Rights Reserved.