@Transactional public class PaymentFileValidationServiceImpl extends Object implements PaymentFileValidationService
org.kuali.ole.pdp.batch.service.PaymentFileValidationService
Modifier and Type | Field and Description |
---|---|
protected AccountService |
accountService |
protected BankService |
bankService |
protected org.kuali.rice.krad.service.BusinessObjectService |
businessObjectService |
protected CustomerProfileService |
customerProfileService |
protected org.kuali.rice.core.api.datetime.DateTimeService |
dateTimeService |
protected org.kuali.rice.kew.api.doctype.DocumentTypeService |
documentTypeService |
protected org.kuali.rice.core.api.config.property.ConfigurationService |
kualiConfigurationService |
protected ObjectCodeService |
objectCodeService |
protected OriginationCodeService |
originationCodeService |
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
parameterService |
protected PaymentFileLoadDao |
paymentFileLoadDao |
protected SubAccountService |
subAccountService |
protected SubObjectCodeService |
subObjectCodeService |
Constructor and Description |
---|
PaymentFileValidationServiceImpl() |
Modifier and Type | Method and Description |
---|---|
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.krad.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.krad.service.BusinessObjectService |
getBusinessObjectService()
Gets the businessObjectService attribute.
|
protected int |
getMaxNoteLines() |
protected PaymentAccountHistory |
newAccountHistory(String attName,
String newValue,
String oldValue,
org.kuali.rice.krad.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.krad.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.krad.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.krad.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.krad.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.krad.service.BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.
|
void |
setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService)
Sets the kualiConfigurationService attribute value.
|
void |
setCustomerProfileService(CustomerProfileService customerProfileService)
Sets the customerProfileService attribute value.
|
void |
setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
Sets the dateTimeService attribute value.
|
void |
setDocumentTypeService(org.kuali.rice.kew.api.doctype.DocumentTypeService documentTypeService) |
void |
setObjectCodeService(ObjectCodeService objectCodeService)
Sets the objectCodeService attribute value.
|
void |
setOriginationCodeService(OriginationCodeService originationCodeService)
Sets the originationCodeService attribute value.
|
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
Sets the parameterService attribute value.
|
void |
setPaymentFileLoadDao(PaymentFileLoadDao paymentFileLoadDao)
Sets the paymentFileLoadDao attribute value.
|
void |
setSubAccountService(SubAccountService subAccountService)
Sets the subAccountService attribute value.
|
void |
setSubObjectCodeService(SubObjectCodeService subObjectCodeService)
Sets the subObjectCodeService attribute value.
|
protected void |
updateDetailAmounts(PaymentDetail paymentDetail)
Sets null amount fields to 0
|
protected CustomerProfileService customerProfileService
protected PaymentFileLoadDao paymentFileLoadDao
protected org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService
protected org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService
protected org.kuali.rice.core.api.datetime.DateTimeService dateTimeService
protected AccountService accountService
protected SubAccountService subAccountService
protected ObjectCodeService objectCodeService
protected SubObjectCodeService subObjectCodeService
protected BankService bankService
protected OriginationCodeService originationCodeService
protected org.kuali.rice.kew.api.doctype.DocumentTypeService documentTypeService
protected org.kuali.rice.krad.service.BusinessObjectService businessObjectService
public PaymentFileValidationServiceImpl()
public void doHardEdits(PaymentFileLoad paymentFile, org.kuali.rice.krad.util.MessageMap errorMap)
PaymentFileValidationService
doHardEdits
in interface PaymentFileValidationService
paymentFile
- parsed payment file objecterrorMap
- map of errors encounteredorg.kuali.ole.pdp.batch.service.PaymentFileValidationService#doHardEdits(org.kuali.ole.pdp.businessobject.PaymentFile,
org.kuali.rice.krad.util.MessageMap)
protected void processHeaderValidation(PaymentFileLoad paymentFile, org.kuali.rice.krad.util.MessageMap errorMap)
paymentFile
- payment file objecterrorMap
- map in which errors will be added toprotected void processTrailerValidation(PaymentFileLoad paymentFile, org.kuali.rice.krad.util.MessageMap errorMap)
paymentFile
- payment file objecterrorMap
- map in which errors will be added toprotected void processGroupValidation(PaymentFileLoad paymentFile, org.kuali.rice.krad.util.MessageMap errorMap)
paymentFile
- payment file objecterrorMap
- map in which errors will be added topublic List<String> doSoftEdits(PaymentFileLoad paymentFile)
PaymentFileValidationService
doSoftEdits
in interface PaymentFileValidationService
paymentFile
- parsed payment file objectList
of warning messagesorg.kuali.ole.pdp.service.PaymentFileValidationService#doSoftEdits(org.kuali.ole.pdp.businessobject.PaymentFile)
public void processGroupSoftEdits(PaymentFileLoad paymentFile, CustomerProfile customer, List<String> warnings)
paymentFile
- payment file objectcustomer
- payment customerwarnings
- List
list of accumulated warning messagesprotected void processDetailSoftEdits(PaymentFileLoad paymentFile, CustomerProfile customer, PaymentDetail paymentDetail, List<String> warnings)
paymentFile
- payment file objectcustomer
- payment customerpaymentDetail
- PaymentDetail
object to processwarnings
- List
list of accumulated warning messagesprotected void processAccountSoftEdits(PaymentFileLoad paymentFile, CustomerProfile customer, PaymentAccountDetail paymentAccountDetail, List<String> warnings)
paymentFile
- payment file objectcustomer
- payment customerpaymentAccountDetail
- PaymentAccountDetail
object to processwarnings
- List
list of accumulated warning messagesprotected void replaceAccountingString(org.kuali.rice.krad.bo.KualiCodeBase objChangeCd, List<PaymentAccountHistory> changeRecords, CustomerProfile customer, PaymentAccountDetail paymentAccountDetail)
objChangeCd
- code indicating reason for changechangeRecords
- List
of PaymentAccountHistory
recordscustomer
- profile of payment customerpaymentAccountDetail
- account detail recordprotected PaymentAccountHistory newAccountHistory(String attName, String newValue, String oldValue, org.kuali.rice.krad.bo.KualiCodeBase changeCode)
attName
- name of field that has changednewValue
- new value for the fieldoldValue
- field value that was changedchangeCode
- code indicating reason for changePaymentAccountHistory
protected void updateDetailAmounts(PaymentDetail paymentDetail)
paymentDetail
- PaymentDetail
to updateprotected void defaultGroupIndicators(PaymentGroup paymentGroup)
paymentGroup
- PaymentGroup
to updateprotected void checkForTaxEmailRequired(PaymentFileLoad paymentFile, PaymentGroup paymentGroup, CustomerProfile customer)
paymentFile
- payment file objectpaymentGroup
- PaymentGroup
being checkedcustomer
- payment customerprotected void checkGroupPaymentDate(PaymentGroup paymentGroup, List<String> warnings)
paymentGroup
- PaymentGroup
being checkedwarnings
- List
list of accumulated warning messagesprotected int getMaxNoteLines()
protected void addWarningMessage(List<String> warnings, String messageKey, String... arguments)
warnings
- List
of messages to add tomessageKey
- resource key for messagearguments
- message substitute parameterspublic void setCustomerProfileService(CustomerProfileService customerProfileService)
customerProfileService
- The customerProfileService to set.public void setPaymentFileLoadDao(PaymentFileLoadDao paymentFileLoadDao)
paymentFileLoadDao
- The paymentFileLoadDao to set.public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
parameterService
- The parameterService to set.public void setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
dateTimeService
- The dateTimeService to set.public void setAccountService(AccountService accountService)
accountService
- The accountService to set.public void setSubAccountService(SubAccountService subAccountService)
subAccountService
- The subAccountService to set.public void setObjectCodeService(ObjectCodeService objectCodeService)
objectCodeService
- The objectCodeService to set.public void setSubObjectCodeService(SubObjectCodeService subObjectCodeService)
subObjectCodeService
- The subObjectCodeService to set.public void setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService)
kualiConfigurationService
- The kualiConfigurationService to set.public void setBankService(BankService bankService)
bankService
- The bankService to set.public void setOriginationCodeService(OriginationCodeService originationCodeService)
originationCodeService
- The originationCodeService to set.protected org.kuali.rice.krad.service.BusinessObjectService getBusinessObjectService()
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
businessObjectService
- The businessObjectService to set.public void setDocumentTypeService(org.kuali.rice.kew.api.doctype.DocumentTypeService documentTypeService)
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.