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.gl.service;
17:
18: import java.util.List;
19:
20: import org.kuali.module.gl.batch.collector.CollectorBatch;
21: import org.kuali.module.gl.bo.OriginEntryGroup;
22: import org.kuali.module.gl.util.CollectorReportData;
23: import org.kuali.module.gl.util.CollectorScrubberStatus;
24:
25: /**
26: * Provides methods for processing gl incoming batch files.
27: */
28: public interface CollectorHelperService {
29:
30: /**
31: * Loads the file given by the filename, then performs the collector process: parse, validate, store, email.
32: *
33: * @param fileName - name of file to load (including path)
34: * @param group the group into which to persist the origin entries for the collector batch/file
35: * @param collectorReportData the object used to store all of the collector status information for reporting
36: * @param collectorScrubberStatuses if the collector scrubber is able to be invoked upon this collector batch, then the status
37: * info of the collector status run is added to the end of this list
38: * @return boolean - true if load was successful, false if errors were encountered
39: */
40: public boolean loadCollectorFile(String fileName,
41: OriginEntryGroup group,
42: CollectorReportData collectorReportData,
43: List<CollectorScrubberStatus> collectorScrubberStatuses);
44:
45: /**
46: * Validates the contents of a parsed file.
47: *
48: * @param batch - batch to validate
49: * @return boolean - true if validation was OK, false if there were errors
50: */
51: public boolean performValidation(CollectorBatch batch);
52:
53: /**
54: * Reconciles the trailer total count and amount to the actual parsed contents.
55: *
56: * @param batch - batch to check trailer
57: * @param collectorReportData if running the actual collector batch process, should be the object representing the reporting
58: * data for the batch run. Otherwise, if running in the batch upload screen or in a manner in which reporting information
59: * is not needed, then null may be passed in
60: * @return boolean - true if trailer check was OK, false if totals did not match
61: */
62: public boolean checkTrailerTotals(CollectorBatch batch,
63: CollectorReportData collectorReportData);
64:
65: }
|