|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.opensagres.xdocreport.document.Generator<In,Out>
public abstract class Generator<In,Out>
Field Summary | |
---|---|
static String |
CONVERTER_ID_HTTP_PARAM
|
static String |
DISPATCH_HTTP_PARAM
|
static String |
DOWNLOAD_DISPATCH
|
static String |
ENTRY_NAME_HTTP_PARAM
|
static String |
PROCESS_STATE_HTTP_PARAM
|
static String |
REMOVE_DISPATCH
|
static String |
REPORT_ID_HTTP_PARAM
|
static String |
TEMPLATE_ENGINE_ID_HTTP_PARAM
|
static String |
TEMPLATE_ENGINE_KIND_HTTP_PARAM
|
static String |
VIEW_DISPATCH
|
Constructor Summary | |
---|---|
Generator()
|
Method Summary | |
---|---|
protected void |
doDocumentArchive(ProcessState state,
String entryName,
In request,
Out response)
|
protected boolean |
doGenerateReport(String entryName,
In request,
Out response)
|
protected void |
doRedirectAfterRemoveReport(In request,
Out response)
|
protected void |
doRemoveReport(In request,
Out response)
Remove report from the registry. |
protected void |
doSaveEntry(ProcessState processState,
String entryName,
In request,
Out response)
Extract entry from a report. |
protected void |
doSaveReport(ProcessState processState,
In request,
Out response)
Save document archive of the report. |
protected abstract void |
error(In request,
Out response,
Exception cause)
Invoked when there is an error thrown in any part of doRequest() processing. |
protected String |
getConverterId(IXDocReport report,
In request)
Returns the converter id. |
protected String |
getDispatchParameter(In request)
Returns dispatch parameter value. |
protected String |
getEntryName(In request)
Returns the entry name of the report. |
protected FieldsMetadata |
getFieldsMetadata(String reportId,
In request)
|
protected Options |
getOptionsConverter(IXDocReport report,
In request)
|
protected abstract OutputStream |
getOutputStream(Out response)
|
protected abstract String |
getParameter(In request,
String name)
|
protected ProcessState |
getProcessState(In request)
Returns process state (original|preprocessed|generated). |
protected XDocReportRegistry |
getRegistry(In request)
Returns the XDocReport registry which load and cache document. |
protected IXDocReport |
getReport(In request)
|
protected String |
getReportId(In request)
Returns the id of the report. |
protected abstract InputStream |
getSourceStream(String reportId,
In request)
Returns input stream of the report to load identified with reportId . |
protected ITemplateEngine |
getTemplateEngine(In request)
Returns the template engine from request and otherwise returns the default template engine. |
protected ITemplateEngine |
getTemplateEngine(IXDocReport report,
In request)
|
protected ITemplateEngine |
getTemplateEngine(String reportId,
In request)
Returns the template engine to use for the report. |
protected String |
getTemplateEngineId(In request)
Returns the template engine id from request. |
protected String |
getTemplateEngineKind(In request)
|
protected String |
getTemplateEngineKind(String reportId,
In request)
|
protected boolean |
isCacheOriginalDocument(String reportId,
In request)
|
protected boolean |
isGenerateContentDisposition(String reportId,
MimeMapping mimeMapping,
In request)
|
protected IXDocReport |
loadReport(String reportId,
XDocReportRegistry registry,
In request)
Load report. |
protected abstract void |
populateContext(IContext context,
String reportId,
In request)
Put the Java model in the context for the report reportId . |
protected abstract void |
prepareHTTPResponse(String id,
MimeMapping mimeMapping,
In request,
Out response)
|
protected abstract void |
prepareHTTPResponse(String reportId,
String entryName,
In request,
Out response)
|
protected void |
prepareOptions(Options options,
IXDocReport report,
String converterId,
In request)
|
void |
processRequest(In request,
Out response)
Handles all requests (by default). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REMOVE_DISPATCH
public static final String DOWNLOAD_DISPATCH
public static final String VIEW_DISPATCH
public static final String REPORT_ID_HTTP_PARAM
public static final String TEMPLATE_ENGINE_KIND_HTTP_PARAM
public static final String TEMPLATE_ENGINE_ID_HTTP_PARAM
public static final String ENTRY_NAME_HTTP_PARAM
public static final String PROCESS_STATE_HTTP_PARAM
public static final String DISPATCH_HTTP_PARAM
public static final String CONVERTER_ID_HTTP_PARAM
Constructor Detail |
---|
public Generator()
Method Detail |
---|
public void processRequest(In request, Out response) throws Exception
request
- In object containing client requestresponse
- Out object for the response
Exception
protected void doRemoveReport(In request, Out response) throws IOException
request
- response
-
IOException
protected void doRedirectAfterRemoveReport(In request, Out response) throws IOException
IOException
protected void doDocumentArchive(ProcessState state, String entryName, In request, Out response) throws Exception
Exception
protected void doSaveReport(ProcessState processState, In request, Out response) throws Exception
processState
- request
- response
-
IOException
Exception
protected void doSaveEntry(ProcessState processState, String entryName, In request, Out response) throws IOException, Exception
processState
- request
- response
-
IOException
Exception
protected boolean doGenerateReport(String entryName, In request, Out response) throws Exception, IOException
Exception
IOException
protected IXDocReport getReport(In request) throws IOException, XDocReportException
request
-
IOException
XDocReportException
protected IXDocReport loadReport(String reportId, XDocReportRegistry registry, In request) throws IOException, XDocReportException
reportId
- registry
- request
-
IOException
XDocReportException
protected boolean isCacheOriginalDocument(String reportId, In request)
protected FieldsMetadata getFieldsMetadata(String reportId, In request)
protected abstract void error(In request, Out response, Exception cause)
request
- original In from servlet container.response
- Out object from servlet container.cause
- Exception that was thrown by some other part of process.protected String getConverterId(IXDocReport report, In request)
request
-
protected Options getOptionsConverter(IXDocReport report, In request)
protected void prepareOptions(Options options, IXDocReport report, String converterId, In request)
protected boolean isGenerateContentDisposition(String reportId, MimeMapping mimeMapping, In request)
protected String getDispatchParameter(In request)
request
-
protected String getReportId(In request)
request
-
protected ProcessState getProcessState(In request)
request
-
protected String getEntryName(In request)
request
-
protected String getTemplateEngineKind(String reportId, In request)
protected String getTemplateEngineKind(In request)
protected String getTemplateEngineId(In request)
request
-
protected ITemplateEngine getTemplateEngine(String reportId, In request)
reportId
- request
-
protected ITemplateEngine getTemplateEngine(IXDocReport report, In request)
protected ITemplateEngine getTemplateEngine(In request)
request
-
protected XDocReportRegistry getRegistry(In request)
request
-
protected abstract InputStream getSourceStream(String reportId, In request) throws IOException, XDocReportException
reportId
.
reportId
- report id.request
- Http servlet request context.
IOException
XDocReportException
protected abstract void populateContext(IContext context, String reportId, In request) throws IOException, XDocReportException
reportId
.
context
- XDocReport context to register Java data model.reportId
- report id.request
- Http servlet request context.
IOException
XDocReportException
protected abstract OutputStream getOutputStream(Out response) throws IOException
IOException
protected abstract String getParameter(In request, String name)
protected abstract void prepareHTTPResponse(String id, MimeMapping mimeMapping, In request, Out response)
protected abstract void prepareHTTPResponse(String reportId, String entryName, In request, Out response)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |