org.pentaho.platform.plugin.action.jasperreports
Class JasperReportsComponent
java.lang.Object
org.pentaho.platform.engine.core.system.PentahoBase
org.pentaho.platform.engine.services.PentahoMessenger
org.pentaho.platform.engine.services.solution.ComponentBase
org.pentaho.platform.plugin.action.jasperreports.JasperReportsComponent
- All Implemented Interfaces:
- Serializable, IAuditable, IComponent, ILogger, IParameterResolver
public class JasperReportsComponent
- extends ComponentBase
- Author:
- James Dixon and Barry Klawans
JasperReports runner for Pentaho.
This class implements a Pentaho Component that runs JasperReports. It
includes full support for parameterization and output in PDF and HTML.
This is a Beta version, with a number of open issues. 1) Data sources must be
specified in the config file for EACH report. There should be a default
source in the jasper reports configuration. 2) Support for JNDI defined data
source has not been added yet. 3) Images are written to the Pentaho temp
directory and never cleaned up. They should probably be moved into Session
related storage. 4) Support should be added so a Filled report can be
persisited into the Pentaho repository and exported repeatedly., Radek Maciaszek
Added handling multiple reports in batch mode which allow to create excel reports with
multiple worksheets
- See Also:
- Serialized Form
Fields inherited from interface org.pentaho.platform.api.engine.ILogger |
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN |
Method Summary |
void |
done()
Allows the component to perform any cleanup after the execution of the
action. |
boolean |
executeAction()
Runs a report. |
org.apache.commons.logging.Log |
getLogger()
|
boolean |
init()
Initialize the Component. |
boolean |
validateAction()
NOTE: The comments from Pentaho state that in production this will not be
called during execution. |
Methods inherited from class org.pentaho.platform.engine.services.solution.ComponentBase |
createFeedbackParameter, createFeedbackParameter, createNewInstance, execute, getActionDefinition, getActionName, getActionTitle, getComponentDefinition, getComponentDefinition, getId, getInitFailMessage, getInitOk, getInstanceId, getLogId, getObjectName, getProcessId, getResourceAsString, getRuntimeContext, getSession, inputMissingError, outputMissingError, promptNeeded, promptNow, resolveParameter, resourceComponentSettingError, resourceMissingError, setActionDefinition, setActionName, setComponentDefinition, setComponentDefinitionMap, setInstanceId, setProcessId, setRuntimeContext, setSession, validate |
Methods inherited from class org.pentaho.platform.engine.services.PentahoMessenger |
debug, debug, error, error, error, fatal, fatal, getMessages, getUserString, info, info, setMessages, trace, trace, warn, warn |
Methods inherited from interface org.pentaho.platform.api.engine.ILogger |
debug, debug, error, error, fatal, fatal, getLoggingLevel, info, info, setLoggingLevel, trace, trace, warn, warn |
JASPER_REPORTS_DESIGN_EXTENSION
public static final String JASPER_REPORTS_DESIGN_EXTENSION
- The extension of the JasperReports reports to run. Currently only designs
saved as an XML file are supported, not searilized JasperDesign objects.
- See Also:
- Constant Field Values
COMPILED_JASPER_REPORTS_EXTENSION
public static final String COMPILED_JASPER_REPORTS_EXTENSION
- The extension of a compiled JasperReports file.
- See Also:
- Constant Field Values
REPORT_FOLDER_PARAMETER
public static final String REPORT_FOLDER_PARAMETER
- The parametername of the report directory (to support subreports)
- See Also:
- Constant Field Values
JasperReportsComponent
public JasperReportsComponent()
getLogger
public org.apache.commons.logging.Log getLogger()
- Specified by:
getLogger
in class PentahoBase
validateAction
public boolean validateAction()
- NOTE: The comments from Pentaho state that in production this will not be
called during execution. If so, this info needs to be moved into the
execute path as well.
- Returns:
- true if the validation was successful
executeAction
public boolean executeAction()
- Runs a report.
- Returns:
- true if action was successful
init
public boolean init()
- Description copied from interface:
IComponent
- Initialize the Component. This method is typically called on
construction.
- Specified by:
init
in interface IComponent
- Specified by:
init
in class ComponentBase
- Returns:
- returns true if the Component initialized successfully, otherwise
returns false
done
public void done()
- Description copied from interface:
IComponent
- Allows the component to perform any cleanup after the execution of the
action.
- Specified by:
done
in interface IComponent
- Specified by:
done
in class ComponentBase