1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.pdp.batch;
17
18 import java.util.ArrayList;
19 import java.util.Date;
20 import java.util.List;
21
22 import org.kuali.ole.pdp.PdpParameterConstants;
23 import org.kuali.ole.pdp.service.AchBankService;
24 import org.kuali.ole.sys.batch.AbstractStep;
25 import org.kuali.ole.sys.service.impl.OleParameterConstants;
26
27 public class LoadFederalReserveBankDataStep extends AbstractStep {
28 private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(LoadFederalReserveBankDataStep.class);
29
30 private AchBankService achBankService;
31 private String directoryName;
32
33
34
35
36 @Override
37 public List<String> getRequiredDirectoryNames() {
38 return new ArrayList<String>() {{add(directoryName); }};
39 }
40
41
42
43
44 public boolean execute(String jobName, Date jobRunDate) throws InterruptedException {
45 LOG.debug("execute() started");
46
47 String filename = getParameterService().getParameterValueAsString(OleParameterConstants.PRE_DISBURSEMENT_BATCH.class, PdpParameterConstants.ACH_BANK_INPUT_FILE);
48
49 return achBankService.reloadTable(directoryName + filename);
50 }
51
52 public void setAchBankService(AchBankService achBankService) {
53 this.achBankService = achBankService;
54 }
55
56 public void setDirectoryName(String dn) {
57 directoryName = dn;
58 }
59 }