Interface ReportProcessTask
-
- All Superinterfaces:
Runnable
- All Known Subinterfaces:
MultiStreamReportProcessTask
- All Known Implementing Classes:
AbstractMultiStreamReportProcessTask
,AbstractReportProcessTask
,FlowCSVReportProcessTask
,FlowExcelReportProcessTask
,FlowHtmlReportProcessTask
,FlowRTFReportProcessTask
,FlowXExcelReportProcessTask
,Graphics2DReportProcessTask
,PageableExcelReportProcessTask
,PageableHtmlReportProcessTask
,PageableXExcelReportProcessTask
,PageableXmlReportProcessTask
,PdfReportProcessTask
,PlainTextReportProcessTask
,PngReportProcessTask
,StreamCSVReportProcessTask
,StreamExcelReportProcessTask
,StreamHtmlReportProcessTask
,StreamRTFReportProcessTask
,StreamXExcelReportProcessTask
,TableXmlReportProcessTask
,ZipHtmlReportProcessTask
public interface ReportProcessTask extends Runnable
A report task is a generic way to create documents of a certain type from a report object. A task encapsulates all implementation details necessary to perform a generic export. All reports are expected to be written to a repository implementation, which can be a filesystem or any other document storage facility.- Author:
- Thomas Morgner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addReportProgressListener(ReportProgressListener listener)
Adds a report progress listener that is able to monitor the export progress.org.pentaho.reporting.libraries.repository.ContentLocation
getBodyContentLocation()
Returns the content location for the generated document.org.pentaho.reporting.libraries.repository.NameGenerator
getBodyNameGenerator()
Returns the name generator for the report document.Throwable
getError()
Returns any error that has caused the report export to fail.MasterReport
getReport()
Returns the report that will be executed in this task.String
getReportMimeType()
Returns the export tasks document mime type.boolean
isTaskAborted()
Checks whether the task was aborted.boolean
isTaskSuccessful()
Checks whether the export was successful.boolean
isValid()
Returns if the task is configured in a way that the export can be safely started.void
removeReportProgressListener(ReportProgressListener listener)
Removes the given report progress listener from the list of listeners.void
setBodyContentLocation(org.pentaho.reporting.libraries.repository.ContentLocation body)
Defines the content location (and implicitly the repository) for the generated report document.void
setBodyNameGenerator(org.pentaho.reporting.libraries.repository.NameGenerator nameGenerator)
Defines the body name generator, that generates name sequences in case the target name is already taken.void
setReport(MasterReport report)
Defines the report that will be executed in this task.
-
-
-
Method Detail
-
setBodyContentLocation
void setBodyContentLocation(org.pentaho.reporting.libraries.repository.ContentLocation body)
Defines the content location (and implicitly the repository) for the generated report document.- Parameters:
body
- the content location for the report document.
-
getBodyContentLocation
org.pentaho.reporting.libraries.repository.ContentLocation getBodyContentLocation()
Returns the content location for the generated document.- Returns:
- the content location where the generated document of the report will be stored.
-
setBodyNameGenerator
void setBodyNameGenerator(org.pentaho.reporting.libraries.repository.NameGenerator nameGenerator)
Defines the body name generator, that generates name sequences in case the target name is already taken. The given namegenerator should return the first-choice document name as first generated name.- Parameters:
nameGenerator
- the name generator.
-
getBodyNameGenerator
org.pentaho.reporting.libraries.repository.NameGenerator getBodyNameGenerator()
Returns the name generator for the report document.- Returns:
- the name generator.
-
setReport
void setReport(MasterReport report)
Defines the report that will be executed in this task. It is assumed that the report is fully parametrized. Report processing will fail if the report requires parameters that are not given.- Parameters:
report
- the report.
-
getReport
MasterReport getReport()
Returns the report that will be executed in this task.- Returns:
- the report.
-
addReportProgressListener
void addReportProgressListener(ReportProgressListener listener)
Adds a report progress listener that is able to monitor the export progress.- Parameters:
listener
- the listener.
-
removeReportProgressListener
void removeReportProgressListener(ReportProgressListener listener)
Removes the given report progress listener from the list of listeners.- Parameters:
listener
- the listener.
-
getReportMimeType
String getReportMimeType()
Returns the export tasks document mime type.- Returns:
- the mime type of the report document that is being generated.
-
getError
Throwable getError()
Returns any error that has caused the report export to fail.- Returns:
- the error that caused a failure, or
null
if there was no error.
-
isTaskAborted
boolean isTaskAborted()
Checks whether the task was aborted. Tasks can be aborted by signaling "interrupt()" to the executing thread.- Returns:
- true, if the task was aborted, false otherwise.
-
isTaskSuccessful
boolean isTaskSuccessful()
Checks whether the export was successful. An aborted task cannot be successfull.- Returns:
- true, if the report was exported successfully, false otherwise.
-
isValid
boolean isValid()
Returns if the task is configured in a way that the export can be safely started.- Returns:
- true, if the task is valid and can be started, false otherwise.
-
-