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

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

public class FileEnterpriseFeederServiceImpl
extends Object
implements EnterpriseFeederService

This class iterates through the files in the enterprise feeder staging directory, which is injected by Spring. Note: this class is NOT annotated as transactional. This allows the helper service, which is defined as transactional, to do a per-file transaction.


Field Summary
 
Fields inherited from interface org.kuali.kfs.module.ld.batch.service.EnterpriseFeederService
DATA_FILE_SUFFIX, DONE_FILE_SUFFIX, RECON_FILE_SUFFIX
 
Constructor Summary
FileEnterpriseFeederServiceImpl()
           
 
Method Summary
 void feed(String processName, boolean performNotifications)
          Feeds file sets in the directory whose name is returned by the invocation to getDirectoryName()
protected  void generateFilesLoadedStatusReport(List<EnterpriseFeederStatusAndErrorMessagesWrapper> statusAndErrorsList)
           
protected  void generateReport(List<EnterpriseFeederStatusAndErrorMessagesWrapper> statusAndErrorsList, LedgerSummaryReport report, String outputFileName)
           
protected  File getDataFile(File doneFile)
          Given the doneFile, this method finds the data file corresponding to the done file
 org.kuali.rice.kns.service.DateTimeService getDateTimeService()
          Gets the dateTimeService attribute.
 String getDirectoryName()
          Gets the directoryName attribute.
 EnterpriseFeederNotificationService getEnterpriseFeederNotificationService()
          Gets the enterpriseFeederNotificationService attribute.
 FileEnterpriseFeederHelperService getFileEnterpriseFeederHelperService()
          Gets the fileEnterpriseFeederHelperService attribute.
 OriginEntryGroupService getOriginEntryGroupService()
          Gets the originEntryGroupService attribute.
 String getReconciliationTableId()
          Gets the reconciliationTableId attribute.
protected  File getReconFile(File doneFile)
          Given the doneFile, this method finds the reconciliation file corresponding to the data file
protected  void reorderDoneFiles(File[] doneFiles)
          Reorders the files in case there's a dependency on the order in which files are fed upon.
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
          Sets the dateTimeService attribute value.
 void setDirectoryName(String directoryName)
          Sets the directoryName attribute value.
 void setEnterpriseFeederNotificationService(EnterpriseFeederNotificationService enterpriseFeederNotificationService)
          Sets the enterpriseFeederNotificationService attribute value.
 void setFileEnterpriseFeederHelperService(FileEnterpriseFeederHelperService fileEnterpriseFeederHelperServiceImpl)
          Sets the fileEnterpriseFeederHelperService attribute value.
 void setLaborOriginEntryDirectoryName(String laborOriginEntryDirectoryName)
          Sets the laborOriginEntryDirectoryName attribute value.
 void setOriginEntryGroupService(OriginEntryGroupService originEntryGroupService)
          Sets the originEntryGroupService attribute value.
 void setReconciliationTableId(String reconciliationTableId)
          Sets the reconciliationTableId attribute value.
 void setReportWriterService(ReportWriterService reportWriterService)
          Sets the reportWriterService attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileEnterpriseFeederServiceImpl

public FileEnterpriseFeederServiceImpl()
Method Detail

feed

public void feed(String processName,
                 boolean performNotifications)
Feeds file sets in the directory whose name is returned by the invocation to getDirectoryName()

Specified by:
feed in interface EnterpriseFeederService
Parameters:
processName - this merely identifies the process executing the feed. It will be used to build any error messages, but computationally it should be ignored.
performNotifications - whether notifications should be sent out
See Also:
org.kuali.kfs.gl.batch.service.EnterpriseFeederService#feed(java.lang.String)

setLaborOriginEntryDirectoryName

public void setLaborOriginEntryDirectoryName(String laborOriginEntryDirectoryName)
Sets the laborOriginEntryDirectoryName attribute value.

Parameters:
laborOriginEntryDirectoryName - The laborOriginEntryDirectoryName to set.

reorderDoneFiles

protected void reorderDoneFiles(File[] doneFiles)
Reorders the files in case there's a dependency on the order in which files are fed upon. For this implementation, the purpose is to always order files in a way such that unit testing will be predictable.

Parameters:
doneFiles -

getDataFile

protected File getDataFile(File doneFile)
Given the doneFile, this method finds the data file corresponding to the done file

Parameters:
doneFile -
Returns:
a File for the data file, or null if the file doesn't exist or is not readable

getReconFile

protected File getReconFile(File doneFile)
Given the doneFile, this method finds the reconciliation file corresponding to the data file

Parameters:
doneFile -
Returns:
a file for the reconciliation data, or null if the file doesn't exist or is not readable

getDirectoryName

public String getDirectoryName()
Gets the directoryName attribute.

Specified by:
getDirectoryName in interface EnterpriseFeederService
Returns:
Returns the directoryName.

setDirectoryName

public void setDirectoryName(String directoryName)
Sets the directoryName attribute value.

Parameters:
directoryName - The directoryName to set.

getOriginEntryGroupService

public OriginEntryGroupService getOriginEntryGroupService()
Gets the originEntryGroupService attribute.

Returns:
Returns the originEntryGroupService.

setOriginEntryGroupService

public void setOriginEntryGroupService(OriginEntryGroupService originEntryGroupService)
Sets the originEntryGroupService attribute value.

Parameters:
originEntryGroupService - The originEntryGroupService to set.

getDateTimeService

public org.kuali.rice.kns.service.DateTimeService getDateTimeService()
Gets the dateTimeService attribute.

Returns:
Returns the dateTimeService.

setDateTimeService

public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
Sets the dateTimeService attribute value.

Parameters:
dateTimeService - The dateTimeService to set.

getFileEnterpriseFeederHelperService

public FileEnterpriseFeederHelperService getFileEnterpriseFeederHelperService()
Gets the fileEnterpriseFeederHelperService attribute.

Returns:
Returns the fileEnterpriseFeederHelperService.

setFileEnterpriseFeederHelperService

public void setFileEnterpriseFeederHelperService(FileEnterpriseFeederHelperService fileEnterpriseFeederHelperServiceImpl)
Sets the fileEnterpriseFeederHelperService attribute value.

Parameters:
fileEnterpriseFeederHelperService - The fileEnterpriseFeederHelperService to set.

getEnterpriseFeederNotificationService

public EnterpriseFeederNotificationService getEnterpriseFeederNotificationService()
Gets the enterpriseFeederNotificationService attribute.

Returns:
Returns the enterpriseFeederNotificationService.

setEnterpriseFeederNotificationService

public void setEnterpriseFeederNotificationService(EnterpriseFeederNotificationService enterpriseFeederNotificationService)
Sets the enterpriseFeederNotificationService attribute value.

Parameters:
enterpriseFeederNotificationService - The enterpriseFeederNotificationService to set.

getReconciliationTableId

public String getReconciliationTableId()
Gets the reconciliationTableId attribute.

Returns:
Returns the reconciliationTableId.

setReconciliationTableId

public void setReconciliationTableId(String reconciliationTableId)
Sets the reconciliationTableId attribute value.

Parameters:
reconciliationTableId - The reconciliationTableId to set.

generateReport

protected void generateReport(List<EnterpriseFeederStatusAndErrorMessagesWrapper> statusAndErrorsList,
                              LedgerSummaryReport report,
                              String outputFileName)

generateFilesLoadedStatusReport

protected void generateFilesLoadedStatusReport(List<EnterpriseFeederStatusAndErrorMessagesWrapper> statusAndErrorsList)

setReportWriterService

public void setReportWriterService(ReportWriterService reportWriterService)
Sets the reportWriterService attribute value.

Parameters:
reportWriterService - The reportWriterService to set.


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