org.kuali.kfs.pdp.service.impl
Class PaymentFileServiceImpl

java.lang.Object
  extended by org.kuali.kfs.pdp.service.impl.PaymentFileServiceImpl
All Implemented Interfaces:
PaymentFileService

@Transactional
public class PaymentFileServiceImpl
extends Object
implements PaymentFileService

See Also:
PaymentFileService

Constructor Summary
PaymentFileServiceImpl()
           
 
Method Summary
protected  Batch createNewBatch(PaymentFileLoad paymentFile, String fileName)
          Create a new Batch record for the payment file.
 boolean createOutputFile(LoadPaymentStatus status, String inputFileName)
          Creates the PDP XML output which can be parsed to obtain load status information
 void doPaymentFileValidation(PaymentFileLoad paymentFile, org.kuali.rice.kns.util.MessageMap errorMap)
          Performs hard edits on payment file
protected  String getBaseFileName(String filename)
           
 void loadPayments(PaymentFileLoad paymentFile, LoadPaymentStatus status, String incomingFileName)
          Performs soft edits of payment file data and loads records into database
protected  PaymentFileLoad parsePaymentFile(BatchInputFileType paymentInputFileType, String incomingFileName, org.kuali.rice.kns.util.MessageMap errorMap)
          Calls BatchInputFileService to validate XML against schema and parse.
protected  PaymentFileLoad processPaymentFile(BatchInputFileType paymentInputFileType, String incomingFileName, org.kuali.rice.kns.util.MessageMap errorMap)
          Attempt to parse the file, run validations, and store batch data
 void processPaymentFiles(BatchInputFileType paymentInputFileType)
          Process all incoming payment files
protected  void removeDoneFile(String dataFileName)
          Clears out the associated .done file for the processed data file
 void setBatchInputFileService(BatchInputFileService batchInputFileService)
          Sets the batchInputFileService attribute value.
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 void setCustomerProfileService(CustomerProfileService customerProfileService)
          Sets the customerProfileService attribute value.
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
          Sets the dateTimeService attribute value.
 void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
          Sets the kualiConfigurationService attribute value.
 void setOutgoingDirectoryName(String outgoingDirectoryName)
          Sets the outgoingDirectoryName attribute value.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          Sets the parameterService attribute value.
 void setPaymentFileEmailService(PdpEmailService paymentFileEmailService)
          Sets the paymentFileEmailService attribute value.
 void setPaymentFileValidationService(PaymentFileValidationService paymentFileValidationService)
          Sets the paymentFileValidationService attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaymentFileServiceImpl

public PaymentFileServiceImpl()
Method Detail

processPaymentFiles

public void processPaymentFiles(BatchInputFileType paymentInputFileType)
Description copied from interface: PaymentFileService
Process all incoming payment files

Specified by:
processPaymentFiles in interface PaymentFileService
Parameters:
paymentInputFileType - BatchInputFileType for payment files
See Also:
PaymentFileService.processPaymentFiles(org.kuali.kfs.sys.batch.BatchInputFileType)

processPaymentFile

protected PaymentFileLoad processPaymentFile(BatchInputFileType paymentInputFileType,
                                             String incomingFileName,
                                             org.kuali.rice.kns.util.MessageMap errorMap)
Attempt to parse the file, run validations, and store batch data

Parameters:
paymentInputFileType - BatchInputFileType for payment files
incomingFileName - name of payment file
errorMap - Map of errors
Returns:
LoadPaymentStatus containing status data for load

doPaymentFileValidation

public void doPaymentFileValidation(PaymentFileLoad paymentFile,
                                    org.kuali.rice.kns.util.MessageMap errorMap)
Description copied from interface: PaymentFileService
Performs hard edits on payment file

Specified by:
doPaymentFileValidation in interface PaymentFileService
Parameters:
paymentFile - PaymentFileLoad containing parsed file contents
errorMap - Map that will hold errors encountered
See Also:
org.kuali.kfs.pdp.service.PaymentFileService#doPaymentFileValidation(org.kuali.kfs.pdp.businessobject.PaymentFileLoad, org.kuali.rice.kns.util.ErrorMap)

loadPayments

public void loadPayments(PaymentFileLoad paymentFile,
                         LoadPaymentStatus status,
                         String incomingFileName)
Description copied from interface: PaymentFileService
Performs soft edits of payment file data and loads records into database

Specified by:
loadPayments in interface PaymentFileService
Parameters:
paymentFile - PaymentFileLoad containing parsed file contents
status - LoadPaymentStatus containing status information for load
incomingFileName - string file name
See Also:
org.kuali.kfs.pdp.service.PaymentFileService#loadPayments(java.lang.String)

parsePaymentFile

protected PaymentFileLoad parsePaymentFile(BatchInputFileType paymentInputFileType,
                                           String incomingFileName,
                                           org.kuali.rice.kns.util.MessageMap errorMap)
Calls BatchInputFileService to validate XML against schema and parse.

Parameters:
paymentInputFileType - BatchInputFileType for payment files
incomingFileName - name of the payment file to parse
errorMap - any errors encountered while parsing are adding to
Returns:
PaymentFile containing the parsed values

createOutputFile

public boolean createOutputFile(LoadPaymentStatus status,
                                String inputFileName)
Description copied from interface: PaymentFileService
Creates the PDP XML output which can be parsed to obtain load status information

Specified by:
createOutputFile in interface PaymentFileService
Parameters:
status - LoadPaymentStatus containing status information for load
inputFileName - incomingFileName string file name
Returns:
true if output file was successfully created, false otherwise
See Also:
PaymentFileService.createOutputFile(org.kuali.kfs.pdp.businessobject.LoadPaymentStatus, java.lang.String)

createNewBatch

protected Batch createNewBatch(PaymentFileLoad paymentFile,
                               String fileName)
Create a new Batch record for the payment file.

Parameters:
paymentFile - parsed payment file object
fileName - payment file name (without path)
Returns:
Batch object

getBaseFileName

protected String getBaseFileName(String filename)

removeDoneFile

protected void removeDoneFile(String dataFileName)
Clears out the associated .done file for the processed data file

Parameters:
dataFileName - the name of date file with done file to remove

setOutgoingDirectoryName

public void setOutgoingDirectoryName(String outgoingDirectoryName)
Sets the outgoingDirectoryName attribute value.

Parameters:
outgoingDirectoryName - The outgoingDirectoryName to set.

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
Sets the parameterService attribute value.

Parameters:
parameterService - The parameterService to set.

setCustomerProfileService

public void setCustomerProfileService(CustomerProfileService customerProfileService)
Sets the customerProfileService attribute value.

Parameters:
customerProfileService - The customerProfileService to set.

setBatchInputFileService

public void setBatchInputFileService(BatchInputFileService batchInputFileService)
Sets the batchInputFileService attribute value.

Parameters:
batchInputFileService - The batchInputFileService to set.

setPaymentFileValidationService

public void setPaymentFileValidationService(PaymentFileValidationService paymentFileValidationService)
Sets the paymentFileValidationService attribute value.

Parameters:
paymentFileValidationService - The paymentFileValidationService to set.

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.

Parameters:
businessObjectService - The businessObjectService to set.

setDateTimeService

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

Parameters:
dateTimeService - The dateTimeService to set.

setPaymentFileEmailService

public void setPaymentFileEmailService(PdpEmailService paymentFileEmailService)
Sets the paymentFileEmailService attribute value.

Parameters:
paymentFileEmailService - The paymentFileEmailService to set.

setKualiConfigurationService

public void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
Sets the kualiConfigurationService attribute value.

Parameters:
kualiConfigurationService - The kualiConfigurationService to set.


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