1 /* 2 * The Kuali Financial System, a comprehensive financial management system for higher education. 3 * 4 * Copyright 2005-2014 The Kuali Foundation 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU Affero General Public License as 8 * published by the Free Software Foundation, either version 3 of the 9 * License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU Affero General Public License for more details. 15 * 16 * You should have received a copy of the GNU Affero General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 package org.kuali.kfs.pdp.service; 20 21 import java.util.Collection; 22 import java.util.Date; 23 import java.util.List; 24 import java.util.Map; 25 26 import org.kuali.kfs.pdp.businessobject.Batch; 27 import org.kuali.kfs.pdp.businessobject.CustomerProfile; 28 import org.kuali.kfs.pdp.businessobject.PaymentDetail; 29 import org.kuali.kfs.pdp.businessobject.PaymentFileLoad; 30 import org.kuali.kfs.pdp.businessobject.PaymentGroup; 31 import org.kuali.kfs.sys.document.PaymentSource; 32 import org.kuali.rice.core.api.util.type.KualiDecimal; 33 import org.kuali.rice.kim.api.identity.Person; 34 import org.kuali.rice.krad.util.MessageMap; 35 36 /** 37 * Defines methods for sending PDP emails. 38 */ 39 public interface PdpEmailService { 40 41 /** 42 * Sends email for a payment load has failed. Errors encountered will be printed out in message 43 * 44 * @param paymentFile parsed payment file object (might not be populated completely due to errors) 45 * @param errors <code>MessageMap</code> containing <code>ErrorMessage</code> entries 46 */ 47 public void sendErrorEmail(PaymentFileLoad paymentFile, MessageMap errors); 48 49 /** 50 * Sends email for a successful payment load. Warnings encountered will be printed out in message 51 * 52 * @param paymentFile parsed payment file object 53 * @param warnings <code>List</code> of <code>String</code> messages 54 */ 55 public void sendLoadEmail(PaymentFileLoad paymentFile, List<String> warnings); 56 57 /** 58 * Sends email for a payment load that was held due to tax reasons 59 * 60 * @param paymentFile parsed payment file object 61 */ 62 public void sendTaxEmail(PaymentFileLoad paymentFile); 63 64 /** 65 * Sends email for a load done internally 66 * 67 * @param batch <code>Batch</code> created by load 68 */ 69 public void sendLoadEmail(Batch batch); 70 71 /** 72 * Sends email for a purap bundle that exceeds the maximum number of notes allowed 73 * 74 * @param creditMemos list of credit memo documents in bundle 75 * @param paymentRequests list of payment request documents in bundle 76 * @param lineTotal total number of lines for bundle 77 * @param maxNoteLines maximum number of lines allowed 78 */ 79 public void sendExceedsMaxNotesWarningEmail(List<String> creditMemos, List<String> paymentRequests, int lineTotal, int maxNoteLines); 80 81 /** 82 * Sends summary email for an ACH extract 83 * 84 * @param unitCounts Map containing payment counts for each unit 85 * @param unitTotals Map containing total payment amount for each unit 86 * @param extractDate date of ACH extraction 87 */ 88 public void sendAchSummaryEmail(Map<String, Integer> unitCounts, Map<String, KualiDecimal> unitTotals, Date extractDate); 89 90 /** 91 * Sends advice notification email to the payee receiving an ACH payment 92 * 93 * @param paymentGroup ACH payment group to send notification for 94 * @param paymentDetail Payment Detail containing payment amounts 95 * @param customer Pdp Customer profile for payment 96 */ 97 public void sendAchAdviceEmail(PaymentGroup paymentGroup, PaymentDetail paymentDetail, CustomerProfile customer); 98 99 /** 100 * Sends Payment Cancellation Email 101 * 102 * @param paymentGroup 103 * @param note 104 * @param user 105 */ 106 public void sendCancelEmail(PaymentGroup paymentGroup, String note, Person user); 107 108 /** 109 * Reads system parameter indicating whether to status emails should be sent 110 * 111 * @return true if email should be sent, false otherwise 112 */ 113 public boolean isPaymentEmailEnabled() ; 114 115 /** 116 * Sends notification e-mail that an immediate extract Disbursement Voucher has been extracted 117 * @param paymentSource the payment source being immediately extracted 118 * @param paymentSourceToExtractService the service used to extract the payment, which reports the e-mail addresses to extract 119 * @param user the current extracting user 120 */ 121 public void sendPaymentSourceImmediateExtractEmail(PaymentSource paymentSource, String fromAddress, Collection<String> toAddresses); 122 }