1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.module.purap.batch;
17
18 import org.apache.log4j.Logger;
19 import org.kuali.ole.module.purap.businessobject.ElectronicInvoiceLoad;
20 import org.kuali.ole.module.purap.service.ElectronicInvoiceHelperService;
21 import org.kuali.ole.sys.batch.AbstractStep;
22
23 import java.util.Date;
24 import java.util.List;
25
26 public class ElectronicInvoiceStep extends AbstractStep {
27
28 private static Logger LOG = Logger.getLogger(ElectronicInvoiceStep.class);
29
30 private ElectronicInvoiceHelperService electronicInvoiceHelperService;
31
32 public boolean execute(String jobName, Date jobRunDate) {
33 ElectronicInvoiceLoad load = electronicInvoiceHelperService.loadElectronicInvoices();
34 return load.containsRejects();
35 }
36
37 public void setElectronicInvoiceHelperService(ElectronicInvoiceHelperService electronicInvoiceHelperService) {
38 this.electronicInvoiceHelperService = electronicInvoiceHelperService;
39 }
40
41
42
43
44
45
46 @Override
47 public List<String> getRequiredDirectoryNames() {
48 return electronicInvoiceHelperService.getRequiredDirectoryNames();
49 }
50 }