1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.gl.batch;
17
18 import java.util.List;
19
20 import org.kuali.ole.gl.document.service.CorrectionDocumentService;
21 import org.kuali.ole.gl.service.ScrubberService;
22 import org.kuali.ole.sys.batch.AbstractWrappedBatchStep;
23 import org.kuali.ole.sys.batch.service.WrappedBatchExecutorService.CustomBatchExecutor;
24
25
26
27
28 public class CorrectionProcessScrubberStep extends AbstractWrappedBatchStep {
29 public static final String STEP_NAME = "correctionProcessScrubberStep";
30 private String documentId;
31 private CorrectionDocumentService correctionDocumentService;
32 private ScrubberService scrubberService;
33
34
35
36
37 @Override
38 public List<String> getRequiredDirectoryNames() {
39 return correctionDocumentService.getRequiredDirectoryNames();
40 }
41
42 @Override
43 protected CustomBatchExecutor getCustomBatchExecutor() {
44 return new CustomBatchExecutor() {
45 public boolean execute() {
46 scrubberService.scrubGroupReportOnly(correctionDocumentService.generateOutputOriginEntryFileName(documentId), documentId);
47 return true;
48 }
49 };
50 }
51
52 public void setDocumentId(String documentId) {
53 this.documentId = documentId;
54 }
55
56 public void setCorrectionDocumentService(CorrectionDocumentService correctionDocumentService) {
57 this.correctionDocumentService = correctionDocumentService;
58 }
59
60 public void setScrubberService(ScrubberService scrubberService) {
61 this.scrubberService = scrubberService;
62 }
63 }