001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.opensource.org/licenses/ecl1.php
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package org.kuali.module.labor.service.impl;
017:
018: import org.kuali.core.service.DateTimeService;
019: import org.kuali.core.service.DocumentTypeService;
020: import org.kuali.core.service.KualiConfigurationService;
021: import org.kuali.core.service.PersistenceService;
022: import org.kuali.module.chart.service.ObjectCodeService;
023: import org.kuali.module.chart.service.OffsetDefinitionService;
024: import org.kuali.module.financial.service.FlexibleOffsetAccountService;
025: import org.kuali.module.gl.bo.OriginEntryGroup;
026: import org.kuali.module.gl.dao.UniversityDateDao;
027: import org.kuali.module.gl.service.OriginEntryGroupService;
028: import org.kuali.module.gl.service.ScrubberValidator;
029: import org.kuali.module.labor.service.LaborOriginEntryService;
030: import org.kuali.module.labor.service.LaborReportService;
031: import org.kuali.module.labor.service.LaborScrubberService;
032: import org.springframework.transaction.annotation.Transactional;
033:
034: /**
035: * Service implementation of LaborScrubberService.
036: */
037: @Transactional
038: public class LaborScrubberServiceImpl implements LaborScrubberService {
039: private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger
040: .getLogger(LaborScrubberServiceImpl.class);
041:
042: private FlexibleOffsetAccountService flexibleOffsetAccountService;
043: private DocumentTypeService documentTypeService;
044: private LaborOriginEntryService laborOriginEntryService;
045: private OriginEntryGroupService originEntryGroupService;
046: private DateTimeService dateTimeService;
047: private OffsetDefinitionService offsetDefinitionService;
048: private ObjectCodeService objectCodeService;
049: private KualiConfigurationService kualiConfigurationService;
050: private UniversityDateDao universityDateDao;
051: private PersistenceService persistenceService;
052: private LaborReportService laborReportService;
053: private ScrubberValidator scrubberValidator;
054:
055: /**
056: * @see org.kuali.module.labor.service.ScrubberService#scrubGroupReportOnly(org.kuali.module.gl.bo.OriginEntryGroup)
057: */
058: public void scrubGroupReportOnly(OriginEntryGroup group,
059: String documentNumber) {
060: LOG.debug("scrubGroupReportOnly() started");
061:
062: // The logic for this was moved into another object because the process was written using
063: // many instance variables which shouldn't be used for Spring services
064:
065: LaborScrubberProcess sp = new LaborScrubberProcess(
066: flexibleOffsetAccountService, documentTypeService,
067: laborOriginEntryService, originEntryGroupService,
068: dateTimeService, offsetDefinitionService,
069: objectCodeService, kualiConfigurationService,
070: universityDateDao, persistenceService,
071: laborReportService, scrubberValidator);
072: sp.scrubGroupReportOnly(group, documentNumber);
073: }
074:
075: /**
076: * @see org.kuali.module.labor.service.ScrubberService#scrubEntries()
077: */
078: public void scrubEntries() {
079: LOG.debug("scrubEntries() started");
080:
081: // The logic for this was moved into another object because the process was written using
082: // many instance variables which shouldn't be used for Spring services
083:
084: LaborScrubberProcess sp = new LaborScrubberProcess(
085: flexibleOffsetAccountService, documentTypeService,
086: laborOriginEntryService, originEntryGroupService,
087: dateTimeService, offsetDefinitionService,
088: objectCodeService, kualiConfigurationService,
089: universityDateDao, persistenceService,
090: laborReportService, scrubberValidator);
091: sp.scrubEntries();
092: }
093:
094: /**
095: * Sets the flexibleOffsetAccountService attribute value.
096: *
097: * @param flexibleOffsetAccountService The flexibleOffsetAccountService to set.
098: */
099: public void setFlexibleOffsetAccountService(
100: FlexibleOffsetAccountService flexibleOffsetAccountService) {
101: this .flexibleOffsetAccountService = flexibleOffsetAccountService;
102: }
103:
104: /**
105: * Sets the documentTypeService attribute value.
106: *
107: * @param documentTypeService The documentTypeService to set.
108: */
109: public void setDocumentTypeService(
110: DocumentTypeService documentTypeService) {
111: this .documentTypeService = documentTypeService;
112: }
113:
114: /**
115: * Sets the setScrubberValidator attribute value.
116: *
117: * @param sv The setScrubberValidator to set.
118: */
119: public void setScrubberValidator(ScrubberValidator sv) {
120: scrubberValidator = sv;
121: }
122:
123: /**
124: * Sets the laborOriginEntryService attribute value.
125: *
126: * @param loes The laborOriginEntryService to set.
127: */
128: public void setLaborOriginEntryService(LaborOriginEntryService loes) {
129: this .laborOriginEntryService = loes;
130: }
131:
132: /**
133: * Sets the originEntryGroupService attribute value.
134: *
135: * @param groupService The originEntryGroupService to set.
136: */
137: public void setOriginEntryGroupService(
138: OriginEntryGroupService groupService) {
139: this .originEntryGroupService = groupService;
140: }
141:
142: /**
143: * Sets the dateTimeService attribute value.
144: *
145: * @param dts The dateTimeService to set.
146: */
147: public void setDateTimeService(DateTimeService dts) {
148: this .dateTimeService = dts;
149: }
150:
151: /**
152: * Sets the universityDateDao attribute value.
153: *
154: * @param universityDateDao The universityDateDao to set.
155: */
156: public void setUniversityDateDao(UniversityDateDao universityDateDao) {
157: this .universityDateDao = universityDateDao;
158: }
159:
160: /**
161: * Sets the persistenceService attribute value.
162: *
163: * @param ps The persistenceService to set.
164: */
165: public void setPersistenceService(PersistenceService ps) {
166: persistenceService = ps;
167: }
168:
169: /**
170: * Sets the offsetDefinitionService attribute value.
171: *
172: * @param offsetDefinitionService The offsetDefinitionService to set.
173: */
174: public void setOffsetDefinitionService(
175: OffsetDefinitionService offsetDefinitionService) {
176: this .offsetDefinitionService = offsetDefinitionService;
177: }
178:
179: /**
180: * Sets the objectCodeService attribute value.
181: *
182: * @param objectCodeService The objectCodeService to set.
183: */
184: public void setObjectCodeService(ObjectCodeService objectCodeService) {
185: this .objectCodeService = objectCodeService;
186: }
187:
188: /**
189: * Sets the kualiConfigurationService attribute value.
190: *
191: * @param kualiConfigurationService The kualiConfigurationService to set.
192: */
193: public void setKualiConfigurationService(
194: KualiConfigurationService kualiConfigurationService) {
195: this .kualiConfigurationService = kualiConfigurationService;
196: }
197:
198: /**
199: * Sets the laborReportService attribute value.
200: *
201: * @param laborReportService The laborReportService to set.
202: */
203: public void setLaborReportService(
204: LaborReportService laborReportService) {
205: this.laborReportService = laborReportService;
206: }
207: }
|