Class AbstractReportProcessTask

    • Constructor Detail

      • AbstractReportProcessTask

        protected AbstractReportProcessTask()
    • Method Detail

      • getBodyContentLocation

        public org.pentaho.reporting.libraries.repository.ContentLocation getBodyContentLocation()
        Returns the content location for the generated document.
        Specified by:
        getBodyContentLocation in interface ReportProcessTask
        Returns:
        the content location where the generated document of the report will be stored.
      • setBodyContentLocation

        public void setBodyContentLocation​(org.pentaho.reporting.libraries.repository.ContentLocation bodyContentLocation)
        Defines the content location (and implicitly the repository) for the generated report document.
        Specified by:
        setBodyContentLocation in interface ReportProcessTask
        Parameters:
        bodyContentLocation - the content location for the report document.
      • getBodyNameGenerator

        public org.pentaho.reporting.libraries.repository.NameGenerator getBodyNameGenerator()
        Returns the name generator for the report document.
        Specified by:
        getBodyNameGenerator in interface ReportProcessTask
        Returns:
        the name generator.
      • setBodyNameGenerator

        public void setBodyNameGenerator​(org.pentaho.reporting.libraries.repository.NameGenerator bodyNameGenerator)
        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.
        Specified by:
        setBodyNameGenerator in interface ReportProcessTask
        Parameters:
        bodyNameGenerator - the name generator.
      • setReport

        public 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.
        Specified by:
        setReport in interface ReportProcessTask
        Parameters:
        report - the report.
      • getReportProgressListeners

        protected ReportProgressListener[] getReportProgressListeners()
        Returns all progress listeners that are registered on this ProcessTask implementation.
        Returns:
        all registered listeners.
      • getError

        public Throwable getError()
        Returns any error that has caused the report export to fail.
        Specified by:
        getError in interface ReportProcessTask
        Returns:
        the error that caused a failure, or null if there was no error.
      • setError

        protected void setError​(Throwable error)
        Updates the error cause.
        Parameters:
        error - the error.
      • isTaskAborted

        public boolean isTaskAborted()
        Checks whether the task was aborted. Tasks can be aborted by signaling "interrupt()" to the executing thread.
        Specified by:
        isTaskAborted in interface ReportProcessTask
        Returns:
        true, if the task was aborted, false otherwise.
      • isTaskSuccessful

        public boolean isTaskSuccessful()
        Checks whether the export was successful. An aborted task cannot be successfull.
        Specified by:
        isTaskSuccessful in interface ReportProcessTask
        Returns:
        true, if the report was exported successfully, false otherwise.
      • isValid

        public boolean isValid()
        Returns if the task is configured in a way that the export can be safely started.
        Specified by:
        isValid in interface ReportProcessTask
        Returns:
        true, if the task is valid and can be started, false otherwise.