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

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

@Transactional
public class PaymentFileValidationServiceImpl
extends Object
implements PaymentFileValidationService

See Also:
org.kuali.kfs.pdp.batch.service.PaymentFileValidationService

Constructor Summary
PaymentFileValidationServiceImpl()
           
 
Method Summary
protected  void addWarningMessage(List<String> warnings, String messageKey, String... arguments)
          Helper method for subsituting message parameters and adding the message to the warning list.
protected  void checkForTaxEmailRequired(PaymentFileLoad paymentFile, PaymentGroup paymentGroup, CustomerProfile customer)
          Checks whether payment status should be set to held and a tax email sent indicating so
protected  void checkGroupPaymentDate(PaymentGroup paymentGroup, List<String> warnings)
          Checks the payment date is not more than 30 days past or 30 days coming
protected  void defaultGroupIndicators(PaymentGroup paymentGroup)
          Sets null indicators to false
 void doHardEdits(PaymentFileLoad paymentFile, org.kuali.rice.kns.util.MessageMap errorMap)
          Performs validations that stop the loading of a payment file.
 List<String> doSoftEdits(PaymentFileLoad paymentFile)
          Performs warning checks and setting of default values.
protected  org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
          Gets the businessObjectService attribute.
protected  int getMaxNoteLines()
           
protected  org.kuali.rice.kns.workflow.service.KualiWorkflowInfo getWorkflowInfoService()
          Gets the workflowInfoService attribute.
protected  PaymentAccountHistory newAccountHistory(String attName, String newValue, String oldValue, org.kuali.rice.kns.bo.KualiCodeBase changeCode)
          Helper method to construct a new payment account history record
protected  void processAccountSoftEdits(PaymentFileLoad paymentFile, CustomerProfile customer, PaymentAccountDetail paymentAccountDetail, List<String> warnings)
          Set default fields on account line and perform account field existence checks
protected  void processDetailSoftEdits(PaymentFileLoad paymentFile, CustomerProfile customer, PaymentDetail paymentDetail, List<String> warnings)
          Set default fields on detail line and check amount against customer threshold.
 void processGroupSoftEdits(PaymentFileLoad paymentFile, CustomerProfile customer, List<String> warnings)
          Set defaults for group fields and do tax checks.
protected  void processGroupValidation(PaymentFileLoad paymentFile, org.kuali.rice.kns.util.MessageMap errorMap)
          Validates payment file groups Checks number of note lines needed is not above the configured maximum allowed Verifies group total is not negative Verifies detail accounting total equals net payment amount
protected  void processHeaderValidation(PaymentFileLoad paymentFile, org.kuali.rice.kns.util.MessageMap errorMap)
          Validates payment file header fields Checks customer exists in customer profile table and is active
protected  void processTrailerValidation(PaymentFileLoad paymentFile, org.kuali.rice.kns.util.MessageMap errorMap)
          Validates payment file trailer fields Reconciles actual to expected payment count and totals Verifies the batch is not a duplicate
protected  void replaceAccountingString(org.kuali.rice.kns.bo.KualiCodeBase objChangeCd, List<PaymentAccountHistory> changeRecords, CustomerProfile customer, PaymentAccountDetail paymentAccountDetail)
          Replaces the entire accounting string with defaults from the customer profile.
 void setAccountService(AccountService accountService)
          Sets the accountService attribute value.
 void setBankService(BankService bankService)
          Sets the bankService 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 setObjectCodeService(ObjectCodeService objectCodeService)
          Sets the objectCodeService attribute value.
 void setOriginationCodeService(OriginationCodeService originationCodeService)
          Sets the originationCodeService attribute value.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          Sets the parameterService attribute value.
 void setPaymentFileLoadDao(PaymentFileLoadDao paymentFileLoadDao)
          Sets the paymentFileLoadDao attribute value.
 void setProjectCodeService(ProjectCodeService projectCodeService)
          Sets the projectCodeService attribute value.
 void setSubAccountService(SubAccountService subAccountService)
          Sets the subAccountService attribute value.
 void setSubObjectCodeService(SubObjectCodeService subObjectCodeService)
          Sets the subObjectCodeService attribute value.
 void setWorkflowInfoService(org.kuali.rice.kns.workflow.service.KualiWorkflowInfo workflowInfoService)
          Sets the workflowInfoService attribute value.
protected  void updateDetailAmounts(PaymentDetail paymentDetail)
          Sets null amount fields to 0
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaymentFileValidationServiceImpl

public PaymentFileValidationServiceImpl()
Method Detail

doHardEdits

public void doHardEdits(PaymentFileLoad paymentFile,
                        org.kuali.rice.kns.util.MessageMap errorMap)
Description copied from interface: PaymentFileValidationService
Performs validations that stop the loading of a payment file.

Specified by:
doHardEdits in interface PaymentFileValidationService
Parameters:
paymentFile - parsed payment file object
errorMap - map of errors encountered
See Also:
org.kuali.kfs.pdp.batch.service.PaymentFileValidationService#doHardEdits(org.kuali.kfs.pdp.businessobject.PaymentFile, org.kuali.rice.kns.util.ErrorMap)

processHeaderValidation

protected void processHeaderValidation(PaymentFileLoad paymentFile,
                                       org.kuali.rice.kns.util.MessageMap errorMap)
Validates payment file header fields
  • Checks customer exists in customer profile table and is active
  • Parameters:
    paymentFile - payment file object
    errorMap - map in which errors will be added to

    processTrailerValidation

    protected void processTrailerValidation(PaymentFileLoad paymentFile,
                                            org.kuali.rice.kns.util.MessageMap errorMap)
    Validates payment file trailer fields
  • Reconciles actual to expected payment count and totals
  • Verifies the batch is not a duplicate
  • Parameters:
    paymentFile - payment file object
    errorMap - map in which errors will be added to

    processGroupValidation

    protected void processGroupValidation(PaymentFileLoad paymentFile,
                                          org.kuali.rice.kns.util.MessageMap errorMap)
    Validates payment file groups
  • Checks number of note lines needed is not above the configured maximum allowed
  • Verifies group total is not negative
  • Verifies detail accounting total equals net payment amount
  • Parameters:
    paymentFile - payment file object
    errorMap - map in which errors will be added to

    doSoftEdits

    public List<String> doSoftEdits(PaymentFileLoad paymentFile)
    Description copied from interface: PaymentFileValidationService
    Performs warning checks and setting of default values.

    Specified by:
    doSoftEdits in interface PaymentFileValidationService
    Parameters:
    paymentFile - parsed payment file object
    Returns:
    List of warning messages
    See Also:
    org.kuali.kfs.pdp.service.PaymentFileValidationService#doSoftEdits(org.kuali.kfs.pdp.businessobject.PaymentFile)

    processGroupSoftEdits

    public void processGroupSoftEdits(PaymentFileLoad paymentFile,
                                      CustomerProfile customer,
                                      List<String> warnings)
    Set defaults for group fields and do tax checks.

    Parameters:
    paymentFile - payment file object
    customer - payment customer
    warnings - List list of accumulated warning messages

    processDetailSoftEdits

    protected void processDetailSoftEdits(PaymentFileLoad paymentFile,
                                          CustomerProfile customer,
                                          PaymentDetail paymentDetail,
                                          List<String> warnings)
    Set default fields on detail line and check amount against customer threshold.

    Parameters:
    paymentFile - payment file object
    customer - payment customer
    paymentDetail - PaymentDetail object to process
    warnings - List list of accumulated warning messages

    processAccountSoftEdits

    protected void processAccountSoftEdits(PaymentFileLoad paymentFile,
                                           CustomerProfile customer,
                                           PaymentAccountDetail paymentAccountDetail,
                                           List<String> warnings)
    Set default fields on account line and perform account field existence checks

    Parameters:
    paymentFile - payment file object
    customer - payment customer
    paymentAccountDetail - PaymentAccountDetail object to process
    warnings - List list of accumulated warning messages

    replaceAccountingString

    protected void replaceAccountingString(org.kuali.rice.kns.bo.KualiCodeBase objChangeCd,
                                           List<PaymentAccountHistory> changeRecords,
                                           CustomerProfile customer,
                                           PaymentAccountDetail paymentAccountDetail)
    Replaces the entire accounting string with defaults from the customer profile.

    Parameters:
    objChangeCd - code indicating reason for change
    changeRecords - List of PaymentAccountHistory records
    customer - profile of payment customer
    paymentAccountDetail - account detail record

    newAccountHistory

    protected PaymentAccountHistory newAccountHistory(String attName,
                                                      String newValue,
                                                      String oldValue,
                                                      org.kuali.rice.kns.bo.KualiCodeBase changeCode)
    Helper method to construct a new payment account history record

    Parameters:
    attName - name of field that has changed
    newValue - new value for the field
    oldValue - field value that was changed
    changeCode - code indicating reason for change
    Returns:
    PaymentAccountHistory

    updateDetailAmounts

    protected void updateDetailAmounts(PaymentDetail paymentDetail)
    Sets null amount fields to 0

    Parameters:
    paymentDetail - PaymentDetail to update

    defaultGroupIndicators

    protected void defaultGroupIndicators(PaymentGroup paymentGroup)
    Sets null indicators to false

    Parameters:
    paymentGroup - PaymentGroup to update

    checkForTaxEmailRequired

    protected void checkForTaxEmailRequired(PaymentFileLoad paymentFile,
                                            PaymentGroup paymentGroup,
                                            CustomerProfile customer)
    Checks whether payment status should be set to held and a tax email sent indicating so

    Parameters:
    paymentFile - payment file object
    paymentGroup - PaymentGroup being checked
    customer - payment customer

    checkGroupPaymentDate

    protected void checkGroupPaymentDate(PaymentGroup paymentGroup,
                                         List<String> warnings)
    Checks the payment date is not more than 30 days past or 30 days coming

    Parameters:
    paymentGroup - PaymentGroup being checked
    warnings - List list of accumulated warning messages

    getMaxNoteLines

    protected int getMaxNoteLines()
    Returns:
    system parameter value giving the maximum number of notes allowed.

    addWarningMessage

    protected void addWarningMessage(List<String> warnings,
                                     String messageKey,
                                     String... arguments)
    Helper method for subsituting message parameters and adding the message to the warning list.

    Parameters:
    warnings - List of messages to add to
    messageKey - resource key for message
    arguments - message substitute parameters

    setCustomerProfileService

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

    Parameters:
    customerProfileService - The customerProfileService to set.

    setPaymentFileLoadDao

    public void setPaymentFileLoadDao(PaymentFileLoadDao paymentFileLoadDao)
    Sets the paymentFileLoadDao attribute value.

    Parameters:
    paymentFileLoadDao - The paymentFileLoadDao to set.

    setParameterService

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

    Parameters:
    parameterService - The parameterService to set.

    setDateTimeService

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

    Parameters:
    dateTimeService - The dateTimeService to set.

    setAccountService

    public void setAccountService(AccountService accountService)
    Sets the accountService attribute value.

    Parameters:
    accountService - The accountService to set.

    setSubAccountService

    public void setSubAccountService(SubAccountService subAccountService)
    Sets the subAccountService attribute value.

    Parameters:
    subAccountService - The subAccountService to set.

    setObjectCodeService

    public void setObjectCodeService(ObjectCodeService objectCodeService)
    Sets the objectCodeService attribute value.

    Parameters:
    objectCodeService - The objectCodeService to set.

    setSubObjectCodeService

    public void setSubObjectCodeService(SubObjectCodeService subObjectCodeService)
    Sets the subObjectCodeService attribute value.

    Parameters:
    subObjectCodeService - The subObjectCodeService to set.

    setProjectCodeService

    public void setProjectCodeService(ProjectCodeService projectCodeService)
    Sets the projectCodeService attribute value.

    Parameters:
    projectCodeService - The projectCodeService to set.

    setKualiConfigurationService

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

    Parameters:
    kualiConfigurationService - The kualiConfigurationService to set.

    setBankService

    public void setBankService(BankService bankService)
    Sets the bankService attribute value.

    Parameters:
    bankService - The bankService to set.

    setOriginationCodeService

    public void setOriginationCodeService(OriginationCodeService originationCodeService)
    Sets the originationCodeService attribute value.

    Parameters:
    originationCodeService - The originationCodeService to set.

    getWorkflowInfoService

    protected org.kuali.rice.kns.workflow.service.KualiWorkflowInfo getWorkflowInfoService()
    Gets the workflowInfoService attribute.

    Returns:
    Returns the workflowInfoService.

    setWorkflowInfoService

    public void setWorkflowInfoService(org.kuali.rice.kns.workflow.service.KualiWorkflowInfo workflowInfoService)
    Sets the workflowInfoService attribute value.

    Parameters:
    workflowInfoService - The workflowInfoService to set.

    getBusinessObjectService

    protected org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
    Gets the businessObjectService attribute.

    Returns:
    Returns the businessObjectService.

    setBusinessObjectService

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

    Parameters:
    businessObjectService - The businessObjectService to set.


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