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.HashMap;
19 import java.util.Map;
20
21 import org.kuali.ole.gl.batch.service.OrganizationReversionProcessService;
22 import org.kuali.ole.gl.batch.service.YearEndService;
23 import org.kuali.ole.sys.OLEConstants;
24 import org.kuali.ole.sys.batch.AbstractWrappedBatchStep;
25 import org.kuali.ole.sys.batch.service.WrappedBatchExecutorService.CustomBatchExecutor;
26 import org.springframework.util.StopWatch;
27
28
29
30
31
32 public class OrganizationReversionCurrentYearAccountStep extends AbstractWrappedBatchStep {
33 private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(OrganizationReversionCurrentYearAccountStep.class);
34 private OrganizationReversionProcessService organizationReversionProcessService;
35 private YearEndService yearEndService;
36
37
38
39
40 @Override
41 protected CustomBatchExecutor getCustomBatchExecutor() {
42 return new CustomBatchExecutor() {
43
44
45
46
47
48
49 public boolean execute() {
50 StopWatch stopWatch = new StopWatch();
51 stopWatch.start("OrganizationReversionCurrentYearAccountStep");
52
53 Map jobParameters = organizationReversionProcessService.getJobParameters();
54 Map<String, Integer> organizationReversionCounts = new HashMap<String, Integer>();
55
56 getYearEndService().logAllMissingSubFundGroups((Integer) jobParameters.get(OLEConstants.UNIV_FISCAL_YR));
57
58 getOrganizationReversionProcessService().organizationReversionCurrentYearAccountProcess(jobParameters, organizationReversionCounts);
59
60 stopWatch.stop();
61 LOG.info("OrganizationReversionCurrentYearAccountStep took " + (stopWatch.getTotalTimeSeconds() / 60.0) + " minutes to complete");
62 return true;
63 }
64 };
65 }
66
67
68
69
70
71
72
73
74
75 public void setOrganizationReversionProcessService(OrganizationReversionProcessService organizationReversionProcessService) {
76 this.organizationReversionProcessService = organizationReversionProcessService;
77 }
78
79
80
81
82
83 public YearEndService getYearEndService() {
84 return yearEndService;
85 }
86
87
88
89
90
91 public void setYearEndService(YearEndService yearEndService) {
92 this.yearEndService = yearEndService;
93 }
94
95
96
97
98
99 public OrganizationReversionProcessService getOrganizationReversionProcessService() {
100 return organizationReversionProcessService;
101 }
102 }