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

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

public class PdpEmailServiceImpl
extends Object
implements PdpEmailService

See Also:
PdpEmailService

Field Summary
protected  org.kuali.rice.kns.service.MailService mailService
           
protected  org.kuali.rice.kns.service.ParameterService parameterService
           
 
Constructor Summary
PdpEmailServiceImpl()
           
 
Method Summary
protected  void addPaymentFieldsToBody(StringBuffer body, Integer batchId, String chart, String unit, String subUnit, Date createDate, int paymentCount, org.kuali.rice.kns.util.KualiDecimal paymentTotal)
          Writes out payment file field labels and values to StringBuffer
 void alterMessageWhenNonProductionInstance(org.kuali.rice.kns.mail.MailMessage message, String environmentCode)
          KFSMI-6475 - Alter the subject and switch all recipients
protected  String getEmailSubject(String subjectParmaterName)
          Retrieves the email subject text from system parameter then checks environment code and prepends to message if not production.
protected  String getMessage(String messageKey, Object... messageParameters)
          Helper method to retrieve a message from resources and substitute place holder values
 boolean isPaymentEmailEnabled()
          Reads system parameter indicating whether to status emails should be sent
 void sendAchAdviceEmail(PaymentGroup paymentGroup, PaymentDetail paymentDetail, CustomerProfile customer)
          Sends advice notification email to the payee receiving an ACH payment
 void sendAchSummaryEmail(Map<String,Integer> unitCounts, Map<String,org.kuali.rice.kns.util.KualiDecimal> unitTotals, Date disbursementDate)
          Sends summary email for an ACH extract
 void sendCancelEmail(PaymentGroup paymentGroup, String note, org.kuali.rice.kim.bo.Person user)
          Sends Payment Cancellation Email
 void sendErrorEmail(PaymentFileLoad paymentFile, org.kuali.rice.kns.util.MessageMap errors)
          Sends email for a payment load has failed.
 void sendExceedsMaxNotesWarningEmail(List<String> creditMemos, List<String> paymentRequests, int lineTotal, int maxNoteLines)
          Sends email for a purap bundle that exceeds the maximum number of notes allowed
 void sendLoadEmail(Batch batch)
          Sends email for a load done internally
 void sendLoadEmail(PaymentFileLoad paymentFile, List<String> warnings)
          Sends email for a successful payment load.
 void sendTaxEmail(PaymentFileLoad paymentFile)
          Sends email for a payment load that was held due to tax reasons
protected  void sendThresholdEmail(boolean fileThreshold, PaymentFileLoad paymentFile, CustomerProfile customer)
          Sends email for a payment that was over the customer file threshold or the detail threshold
 void setAchBankService(AchBankService achBankService)
          Sets the achBankService attribute value.
 void setCustomerProfileService(CustomerProfileService customerProfileService)
          Sets the customerProfileService attribute value.
 void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
          Sets the dataDictionaryService attribute value.
 void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
          Sets the kualiConfigurationService attribute value.
 void setMailService(org.kuali.rice.kns.service.MailService mailService)
          Sets the mailService attribute value.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          Sets the parameterService attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mailService

protected org.kuali.rice.kns.service.MailService mailService

parameterService

protected org.kuali.rice.kns.service.ParameterService parameterService
Constructor Detail

PdpEmailServiceImpl

public PdpEmailServiceImpl()
Method Detail

sendErrorEmail

public void sendErrorEmail(PaymentFileLoad paymentFile,
                           org.kuali.rice.kns.util.MessageMap errors)
Description copied from interface: PdpEmailService
Sends email for a payment load has failed. Errors encountered will be printed out in message

Specified by:
sendErrorEmail in interface PdpEmailService
Parameters:
paymentFile - parsed payment file object (might not be populated completely due to errors)
errors - ErrorMap containing ErrorMessage entries
See Also:
org.kuali.kfs.pdp.service.PdpEmailService#sendErrorEmail(org.kuali.kfs.pdp.businessobject.PaymentFileLoad, org.kuali.rice.kns.util.ErrorMap)

alterMessageWhenNonProductionInstance

public void alterMessageWhenNonProductionInstance(org.kuali.rice.kns.mail.MailMessage message,
                                                  String environmentCode)
KFSMI-6475 - Alter the subject and switch all recipients

Parameters:
message -
environmentCode -

sendLoadEmail

public void sendLoadEmail(PaymentFileLoad paymentFile,
                          List<String> warnings)
Description copied from interface: PdpEmailService
Sends email for a successful payment load. Warnings encountered will be printed out in message

Specified by:
sendLoadEmail in interface PdpEmailService
Parameters:
paymentFile - parsed payment file object
warnings - List of String messages
See Also:
PdpEmailService.sendLoadEmail(org.kuali.kfs.pdp.businessobject.PaymentFileLoad, java.util.List)

sendThresholdEmail

protected void sendThresholdEmail(boolean fileThreshold,
                                  PaymentFileLoad paymentFile,
                                  CustomerProfile customer)
Sends email for a payment that was over the customer file threshold or the detail threshold

Parameters:
fileThreshold - indicates whether the file threshold (true) was violated or the detail threshold (false)
paymentFile - parsed payment file object
customer - payment customer

sendTaxEmail

public void sendTaxEmail(PaymentFileLoad paymentFile)
Description copied from interface: PdpEmailService
Sends email for a payment load that was held due to tax reasons

Specified by:
sendTaxEmail in interface PdpEmailService
Parameters:
paymentFile - parsed payment file object
See Also:
PdpEmailService.sendTaxEmail(org.kuali.kfs.pdp.businessobject.PaymentFileLoad)

sendLoadEmail

public void sendLoadEmail(Batch batch)
Description copied from interface: PdpEmailService
Sends email for a load done internally

Specified by:
sendLoadEmail in interface PdpEmailService
Parameters:
batch - Batch created by load
See Also:
PdpEmailService.sendLoadEmail(org.kuali.kfs.pdp.businessobject.Batch)

sendExceedsMaxNotesWarningEmail

public void sendExceedsMaxNotesWarningEmail(List<String> creditMemos,
                                            List<String> paymentRequests,
                                            int lineTotal,
                                            int maxNoteLines)
Description copied from interface: PdpEmailService
Sends email for a purap bundle that exceeds the maximum number of notes allowed

Specified by:
sendExceedsMaxNotesWarningEmail in interface PdpEmailService
Parameters:
creditMemos - list of credit memo documents in bundle
paymentRequests - list of payment request documents in bundle
lineTotal - total number of lines for bundle
maxNoteLines - maximum number of lines allowed
See Also:
PdpEmailService.sendExceedsMaxNotesWarningEmail(java.util.List, java.util.List, int, int)

sendAchSummaryEmail

public void sendAchSummaryEmail(Map<String,Integer> unitCounts,
                                Map<String,org.kuali.rice.kns.util.KualiDecimal> unitTotals,
                                Date disbursementDate)
Description copied from interface: PdpEmailService
Sends summary email for an ACH extract

Specified by:
sendAchSummaryEmail in interface PdpEmailService
Parameters:
unitCounts - Map containing payment counts for each unit
unitTotals - Map containing total payment amount for each unit
disbursementDate - date of ACH extraction
See Also:
PdpEmailService.sendAchSummaryEmail(java.util.Map, java.util.Map, java.util.Date)

sendAchAdviceEmail

public void sendAchAdviceEmail(PaymentGroup paymentGroup,
                               PaymentDetail paymentDetail,
                               CustomerProfile customer)
Description copied from interface: PdpEmailService
Sends advice notification email to the payee receiving an ACH payment

Specified by:
sendAchAdviceEmail in interface PdpEmailService
Parameters:
paymentGroup - ACH payment group to send notification for
paymentDetail - Payment Detail containing payment amounts
customer - Pdp Customer profile for payment
See Also:
org.kuali.kfs.pdp.service.PdpEmailService#sendAchAdviceEmail(org.kuali.kfs.pdp.businessobject.PaymentGroup, org.kuali.kfs.pdp.businessobject.CustomerProfile, org.kuali.kfs.pdp.businessobject.PaymentDetail)

sendCancelEmail

public void sendCancelEmail(PaymentGroup paymentGroup,
                            String note,
                            org.kuali.rice.kim.bo.Person user)
Description copied from interface: PdpEmailService
Sends Payment Cancellation Email

Specified by:
sendCancelEmail in interface PdpEmailService
See Also:
PdpEmailService.sendCancelEmail(org.kuali.kfs.pdp.businessobject.PaymentGroup, java.lang.String, org.kuali.rice.kim.bo.Person)

addPaymentFieldsToBody

protected void addPaymentFieldsToBody(StringBuffer body,
                                      Integer batchId,
                                      String chart,
                                      String unit,
                                      String subUnit,
                                      Date createDate,
                                      int paymentCount,
                                      org.kuali.rice.kns.util.KualiDecimal paymentTotal)
Writes out payment file field labels and values to StringBuffer

Parameters:
body - StringBuffer

isPaymentEmailEnabled

public boolean isPaymentEmailEnabled()
Reads system parameter indicating whether to status emails should be sent

Specified by:
isPaymentEmailEnabled in interface PdpEmailService
Returns:
true if email should be sent, false otherwise

getEmailSubject

protected String getEmailSubject(String subjectParmaterName)
Retrieves the email subject text from system parameter then checks environment code and prepends to message if not production.

Parameters:
subjectParmaterName - name of parameter giving the subject text
Returns:
subject text

getMessage

protected String getMessage(String messageKey,
                            Object... messageParameters)
Helper method to retrieve a message from resources and substitute place holder values

Parameters:
messageKey - key of message in resource file
messageParameters - parameter for message
Returns:
String Message with substituted values

setCustomerProfileService

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

Parameters:
customerProfileService - The customerProfileService to set.

setKualiConfigurationService

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

Parameters:
kualiConfigurationService - The kualiConfigurationService to set.

setMailService

public void setMailService(org.kuali.rice.kns.service.MailService mailService)
Sets the mailService attribute value.

Parameters:
mailService - The mailService to set.

setParameterService

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

Parameters:
parameterService - The parameterService to set.

setDataDictionaryService

public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
Sets the dataDictionaryService attribute value.

Parameters:
dataDictionaryService - The dataDictionaryService to set.

setAchBankService

public void setAchBankService(AchBankService achBankService)
Sets the achBankService attribute value.

Parameters:
achBankService - The achBankService to set.


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