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.io.File;
19:
20: import org.kuali.module.gl.bo.OriginEntryGroup;
21: import org.kuali.module.gl.util.EnterpriseFeederStatusAndErrorMessagesWrapper;
22:
23: /**
24: * Implementations of this interface are responsible for reconciliation of origin entry data in a file and loading them into the
25: * origin entry table. Note that implementations of this class may have special useful transactional properties. See implementation
26: * description for more details.
27: */
28: public interface FileEnterpriseFeederHelperService {
29:
30: /**
31: * Reconciles and loads a file of origin entries into the origin entry table. This method DOES NOT handle the deletion of the
32: * done file
33: *
34: * @param doneFile the done file. Must exist and be non-empty
35: * @param dataFile the data file. A connection to this file may be opened multiple times by this method.
36: * @param reconFile the reconciliation file. See implementations of
37: * {@link org.kuali.module.gl.service.ReconciliationParserService} to determine the format of the data in a file.
38: * @param originEntryGroup the group in which to place the origin entries
39: * @param feederProcessName the name of the process that's invoking this method.
40: * @param reconciliationTableId the name of the reconciliation block to use within the reconciliation file
41: * @param statusAndErrors a class with references to a {@link org.kuali.module.gl.util.EnterpriseFeederStatus} object and a list
42: * of error messages. Implementations of this method may need to throw an exception to force a transaction rollback,
43: * which means that it can't return a value. This parameter allows the method to output status/error information
44: */
45: public void feedOnFile(
46: File doneFile,
47: File dataFile,
48: File reconFile,
49: OriginEntryGroup originEntryGroup,
50: String feederProcessName,
51: String reconciliationTableId,
52: EnterpriseFeederStatusAndErrorMessagesWrapper statusAndErrors);
53: }
|