public class BaseReportActionHandler extends BaseProcessActionHandler
Modifier and Type | Field and Description |
---|---|
protected static String |
JASPER_REPORT_PARAMETERS |
Constructor and Description |
---|
BaseReportActionHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAdditionalParameters(ReportDefinition process,
org.codehaus.jettison.json.JSONObject jsonContent,
Map<String,Object> parameters)
Override this method to put additional parameters to send to the Jasper Report template.
|
protected org.codehaus.jettison.json.JSONObject |
doExecute(Map<String,Object> parameters,
String content) |
protected void |
doValidations(ReportDefinition report,
Map<String,Object> parameters,
org.codehaus.jettison.json.JSONObject jsonContent)
Override this method to add validations to the report before it is generated.
|
void |
execute()
execute() method overridden to add the logic to download or display the report file stored in
the temporary folder.
|
protected ConnectionProvider |
getReportConnectionProvider()
Get the connection provider to use in report generation.
|
protected net.sf.jasperreports.engine.JRDataSource |
getReportData(Map<String,Object> parameters)
Get the data to pass to the report generation method.
|
protected String |
getReportTemplatePath(ReportingUtils.ExportType expType,
ReportDefinition report,
org.codehaus.jettison.json.JSONObject jsonContent)
Get the PDF, XLS or HTML template path from the Report Definition.
|
protected boolean |
isCompilingSubreports()
Override this method to define if the sub-reports generated with the handler must be compiled.
|
execute, fixRequestMap, getResponseBuilder, hasAccess
fixRequestMap
protected static final String JASPER_REPORT_PARAMETERS
public void execute()
execute
in interface ActionHandler
execute
in class BaseActionHandler
protected org.codehaus.jettison.json.JSONObject doExecute(Map<String,Object> parameters, String content)
doExecute
in class BaseProcessActionHandler
protected String getReportTemplatePath(ReportingUtils.ExportType expType, ReportDefinition report, org.codehaus.jettison.json.JSONObject jsonContent) throws org.codehaus.jettison.json.JSONException, OBException
expType
- The export type.report
- The Report Definition.jsonContent
- JSONObject with the values set in the filter parameters, used by the classes extending
this one when generating reports which use more than one template. In that case, the
selection of the template can be done based on the values of the parameters present in
this JSONObject.org.codehaus.jettison.json.JSONException
OBException
protected void doValidations(ReportDefinition report, Map<String,Object> parameters, org.codehaus.jettison.json.JSONObject jsonContent) throws OBException
report
- the Report Definitionparameters
- Map including the parameters of the call.jsonContent
- JSONObject with the values set in the filter parameters.OBException
protected void addAdditionalParameters(ReportDefinition process, org.codehaus.jettison.json.JSONObject jsonContent, Map<String,Object> parameters)
process
- the Process Definition of the ReportjsonContent
- values set in the filter parametersparameters
- the current Parameter Map that it is send to the Jasper Report.protected net.sf.jasperreports.engine.JRDataSource getReportData(Map<String,Object> parameters)
parameters
- map that contains the parameters of the HTTP request and the parameters that will be
sent to the jasper reportprotected ConnectionProvider getReportConnectionProvider()
protected boolean isCompilingSubreports()