InstructorReportJobFactory.java

  1. package edu.ucsb.cs156.happiercows.jobs;

  2. import org.springframework.beans.factory.annotation.Autowired;
  3. import org.springframework.stereotype.Service;

  4. import edu.ucsb.cs156.happiercows.repositories.CommonsRepository;
  5. import edu.ucsb.cs156.happiercows.services.ReportService;
  6. import edu.ucsb.cs156.happiercows.services.jobs.JobContextConsumer;

  7. @Service
  8. public class InstructorReportJobFactory {

  9.     @Autowired
  10.     private ReportService reportService;

  11.     @Autowired
  12.     private CommonsRepository commonsRepository;

  13.     public JobContextConsumer create() {
  14.         return new InstructorReportJob(reportService, commonsRepository);
  15.     }

  16. }