public abstract class AbstractReportService<T> extends Object implements ReportService
JasperReportService. Any other third party reporting framework can be supported by implementing a class that extends from AbstractReportService and
then configuring that class in the global bean definitions xml.| Constructor and Description |
|---|
AbstractReportService(int templateCachMinSize,
int templateCacheMaxSize) |
| Modifier and Type | Method and Description |
|---|---|
ReportOutput |
createReport(ReportRequest reportInput)
Creates report using given report input object, and returns the generated report output object.
|
protected abstract ReportOutput |
createReportFromHql(ReportRequest reportInput)
Creates report using a template that uses HQL for fetching data
|
protected abstract ReportOutput |
createReportFromJavaBean(ReportRequest reportInput)
Creates a report using given report input where the report data source is java beans
|
protected ReportOutput |
createReportFromSql(ReportRequest reportInput)
Creates report using a JDBC connection
|
protected abstract ReportOutput |
createReportFromSql(ReportRequest reportInput,
Connection connection)
Creates report for given report template, format, connection and parameters
|
protected T |
getTemplate(String templateName)
Returns the Report Template object for given template path.
|
protected abstract String |
getTemplateExtension() |
boolean |
isValidTemplate(String templateName) |
protected abstract T |
loadTemplate(InputStream templateInputStream) |
public AbstractReportService(int templateCachMinSize,
int templateCacheMaxSize)
templateCacheMinSize - Minimum size of template cachetemplateCacheMaxSize - Maximum size of template cacheprotected abstract ReportOutput createReportFromJavaBean(ReportRequest reportInput)
reportInput - The report inputprotected abstract ReportOutput createReportFromSql(ReportRequest reportInput, Connection connection)
reportInput - Report Input objectdataSource - Data sourceprotected abstract ReportOutput createReportFromHql(ReportRequest reportInput)
reportInput - The report inputprotected abstract String getTemplateExtension()
protected abstract T loadTemplate(InputStream templateInputStream)
templateInputStream - Input stream from which the report template is to be loadedpublic ReportOutput createReport(ReportRequest reportInput)
ReportServicecreateReport in interface ReportServicereportInput - Input to be passed to report engine for generating the reportReportRequest,
ReportOutputprotected ReportOutput createReportFromSql(ReportRequest reportInput)
reportInput - The report inputprotected T getTemplate(String templateName)
templateName - Name of the Report template (without extension)public boolean isValidTemplate(String templateName)
isValidTemplate in interface ReportServicetemplateName - Template name to be checkedCopyright © 2015–2016 eGovernments Foundation. All rights reserved.