01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.module.chart.batch;
17:
18: import org.kuali.kfs.KFSConstants;
19: import org.kuali.kfs.batch.AbstractStep;
20: import org.kuali.module.chart.service.DateMakerService;
21:
22: /**
23: * This is the batch step implementation for Fiscal Year Maker. It brings forward the appropriate rows from certain chart, gl, and
24: * labor tables specified by the makerObjectsList property of the fiscalYearMakersDao bean.
25: */
26: public class FiscalYearMakerStep extends AbstractStep {
27: private DateMakerService dateMakerService;
28:
29: /**
30: * Calls the fiscalYearMakers method of DateMakerService, passing the
31: * KFSConstants.ChartApcParms.FISCAL_YEAR_MAKER_SOURCE_FISCAL_YEAR and KFSConstants.ChartApcParms.FISCAL_YEAR_MAKER_REPLACE_MODE
32: * parameters from the KFSConstants.ParameterGroups.CHART_FISCAL_YEAR_MAKER security group.
33: *
34: * @see org.kuali.kfs.batch.Step#execute(java.lang.String)
35: */
36: public boolean execute(String jobName) throws InterruptedException {
37: dateMakerService
38: .fiscalYearMakers(
39: Integer
40: .parseInt(getParameterService()
41: .getParameterValue(
42: getClass(),
43: KFSConstants.ChartApcParms.FISCAL_YEAR_MAKER_SOURCE_FISCAL_YEAR)),
44: getParameterService()
45: .getIndicatorParameter(
46: getClass(),
47: KFSConstants.ChartApcParms.FISCAL_YEAR_MAKER_REPLACE_MODE));
48: return true;
49: }
50:
51: /**
52: * For Spring.
53: *
54: * @param dateMakerService
55: */
56: public void setDateMakerService(DateMakerService dateMakerService) {
57: this.dateMakerService = dateMakerService;
58: }
59: }
|