001 /* 002 * Copyright 2011 The Kuali Foundation. 003 * 004 * Licensed under the Educational Community License, Version 2.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/ecl2.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.kfs.module.ld.batch.service; 017 018 import java.io.File; 019 import java.io.PrintStream; 020 021 import org.kuali.kfs.gl.businessobject.OriginEntryGroup; 022 import org.kuali.kfs.gl.report.LedgerSummaryReport; 023 import org.kuali.kfs.gl.service.impl.EnterpriseFeederStatusAndErrorMessagesWrapper; 024 025 026 /** 027 * Implementations of this interface are responsible for reconciliation of origin entry data in a file and loading them into the 028 * origin entry table. Note that implementations of this class may have special useful transactional properties. See implementation 029 * description for more details. 030 */ 031 public interface FileEnterpriseFeederHelperService { 032 033 /** 034 * Reconciles and loads a file of origin entries into the origin entry table. This method DOES NOT handle the deletion of the 035 * done file 036 * 037 * @param doneFile the done file. Must exist and be non-empty 038 * @param dataFile the data file. A connection to this file may be opened multiple times by this method. 039 * @param reconFile the reconciliation file. See implementations of 040 * {@link org.kuali.kfs.gl.batch.service.ReconciliationParserService} to determine the format of the data in a file. 041 * @param originEntryGroup the group in which to place the origin entries 042 * @param feederProcessName the name of the process that's invoking this method. 043 * @param reconciliationTableId the name of the reconciliation block to use within the reconciliation file 044 * @param statusAndErrors a class with references to a {@link org.kuali.kfs.gl.batch.service.impl.EnterpriseFeederStatus} object and a list 045 * of error messages. Implementations of this method may need to throw an exception to force a transaction rollback, 046 * which means that it can't return a value. This parameter allows the method to output status/error information 047 */ 048 public void feedOnFile(File doneFile, File dataFile, File reconFile, PrintStream enterpriseFeedPs, String feederProcessName, String reconciliationTableId, EnterpriseFeederStatusAndErrorMessagesWrapper statusAndErrors, LedgerSummaryReport ledgerSummaryReport); 049 }