Class MongoQueryReportTasklet

  • All Implemented Interfaces:
    org.springframework.batch.core.step.tasklet.Tasklet, org.springframework.beans.factory.InitializingBean, ReportGenerator

    public class MongoQueryReportTasklet
    extends ThymeleafReportTasklet
    implements ReportGenerator, org.springframework.beans.factory.InitializingBean
    • Constructor Detail

      • MongoQueryReportTasklet

        public MongoQueryReportTasklet()
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • generateReport

        public ReportGenerationResult generateReport​(java.io.File reportFile,
                                                     org.springframework.batch.core.StepContribution sc,
                                                     org.springframework.batch.core.scope.context.ChunkContext cc)
                                              throws java.lang.Exception
        Description copied from interface: ReportGenerator
        Generate a report
        Specified by:
        generateReport in interface ReportGenerator
        Parameters:
        reportFile - The file to write the report to
        sc - The current step contribution
        cc - The current ChunkContext
        Returns:
        A ReportGenerationResult. Typically with the status OK. For certain types of report generators with a notion of "failure", it may make sense to return Failed, to support. See @SqlValidationTasklet
        Throws:
        java.lang.Exception