org.kuali.kfs.module.ld.batch.service.impl
Class FileEnterpriseFeederHelperServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.ld.batch.service.impl.FileEnterpriseFeederHelperServiceImpl
All Implemented Interfaces:
FileEnterpriseFeederHelperService

public class FileEnterpriseFeederHelperServiceImpl
extends Object
implements FileEnterpriseFeederHelperService

This class reads origin entries in a flat file format, reconciles them, and loads them into the origin entry table. Note: the feeding algorithm of this service will read the data file twice to minimize memory usage.


Constructor Summary
FileEnterpriseFeederHelperServiceImpl()
           
 
Method Summary
 void feedOnFile(File doneFile, File dataFile, File reconFile, PrintStream enterpriseFeedPs, String feederProcessName, String reconciliationTableId, EnterpriseFeederStatusAndErrorMessagesWrapper statusAndErrors, LedgerSummaryReport ledgerSummaryReport)
          This method does the reading and the loading of reconciliation.
 OriginEntryService getOriginEntryService()
          Gets the originEntryService attribute.
 ReconciliationParserService getReconciliationParserService()
          Gets the reconciliationParserService attribute.
 ReconciliationService getReconciliationService()
          Gets the reconciliationService attribute.
protected  boolean reconciliationProcessSucceeded(List<Message> errorMessages)
          Returns whether the reconciliation process succeeded by looking at the reconciliation error messages For this implementation, the reconciliation does not succeed if at least one of the error messages in the list has a type of Message.TYPE_FATAL
 void setOriginEntryService(OriginEntryService originEntryService)
          Sets the originEntryService attribute value.
 void setReconciliationParserService(ReconciliationParserService reconciliationParserService)
          Sets the reconciliationParserService attribute value.
 void setReconciliationService(ReconciliationService reconciliationService)
          Sets the reconciliationService attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileEnterpriseFeederHelperServiceImpl

public FileEnterpriseFeederHelperServiceImpl()
Method Detail

feedOnFile

public void feedOnFile(File doneFile,
                       File dataFile,
                       File reconFile,
                       PrintStream enterpriseFeedPs,
                       String feederProcessName,
                       String reconciliationTableId,
                       EnterpriseFeederStatusAndErrorMessagesWrapper statusAndErrors,
                       LedgerSummaryReport ledgerSummaryReport)
This method does the reading and the loading of reconciliation. Read class description. This method DOES NOT handle the deletion of the done file

Specified by:
feedOnFile in interface FileEnterpriseFeederHelperService
Parameters:
doneFile - a URL that must be present. The contents may be empty
dataFile - a URL to a flat file of origin entry rows.
reconFile - a URL to the reconciliation file. See the implementation of ReconciliationParserService for file format.
originEntryGroup - the group into which the origin entries will be loaded
feederProcessName - the name of the feeder process
reconciliationTableId - the name of the block to use for reconciliation within the reconciliation file
statusAndErrors - any status information should be stored within this object
See Also:
org.kuali.module.gl.service.impl.FileEnterpriseFeederHelperService#feedOnFile(java.io.File, java.io.File, java.io.File, org.kuali.kfs.gl.businessobject.OriginEntryGroup)

reconciliationProcessSucceeded

protected boolean reconciliationProcessSucceeded(List<Message> errorMessages)
Returns whether the reconciliation process succeeded by looking at the reconciliation error messages For this implementation, the reconciliation does not succeed if at least one of the error messages in the list has a type of Message.TYPE_FATAL

Parameters:
errorMessages - a List of errorMessages
Returns:
true if any of those error messages were fatal

getReconciliationParserService

public ReconciliationParserService getReconciliationParserService()
Gets the reconciliationParserService attribute.

Returns:
Returns the reconciliationParserService.

setReconciliationParserService

public void setReconciliationParserService(ReconciliationParserService reconciliationParserService)
Sets the reconciliationParserService attribute value.

Parameters:
reconciliationParserService - The reconciliationParserService to set.

getReconciliationService

public ReconciliationService getReconciliationService()
Gets the reconciliationService attribute.

Returns:
Returns the reconciliationService.

setReconciliationService

public void setReconciliationService(ReconciliationService reconciliationService)
Sets the reconciliationService attribute value.

Parameters:
reconciliationService - The reconciliationService to set.

getOriginEntryService

public OriginEntryService getOriginEntryService()
Gets the originEntryService attribute.

Returns:
Returns the originEntryService.

setOriginEntryService

public void setOriginEntryService(OriginEntryService originEntryService)
Sets the originEntryService attribute value.

Parameters:
originEntryService - The originEntryService to set.


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.