001 /*
002 * Copyright 2011 The Kuali Foundation.
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.kfs.pdp.service;
017
018 import java.util.Date;
019 import java.util.List;
020 import java.util.Map;
021
022 import org.kuali.kfs.pdp.businessobject.Batch;
023 import org.kuali.kfs.pdp.businessobject.CustomerProfile;
024 import org.kuali.kfs.pdp.businessobject.PaymentDetail;
025 import org.kuali.kfs.pdp.businessobject.PaymentFileLoad;
026 import org.kuali.kfs.pdp.businessobject.PaymentGroup;
027 import org.kuali.rice.kim.bo.Person;
028 import org.kuali.rice.kns.util.KualiDecimal;
029 import org.kuali.rice.kns.util.MessageMap;
030
031 /**
032 * Defines methods for sending PDP emails.
033 */
034 public interface PdpEmailService {
035
036 /**
037 * Sends email for a payment load has failed. Errors encountered will be printed out in message
038 *
039 * @param paymentFile parsed payment file object (might not be populated completely due to errors)
040 * @param errors <code>ErrorMap</code> containing <code>ErrorMessage</code> entries
041 */
042 public void sendErrorEmail(PaymentFileLoad paymentFile, MessageMap errors);
043
044 /**
045 * Sends email for a successful payment load. Warnings encountered will be printed out in message
046 *
047 * @param paymentFile parsed payment file object
048 * @param warnings <code>List</code> of <code>String</code> messages
049 */
050 public void sendLoadEmail(PaymentFileLoad paymentFile, List<String> warnings);
051
052 /**
053 * Sends email for a payment load that was held due to tax reasons
054 *
055 * @param paymentFile parsed payment file object
056 */
057 public void sendTaxEmail(PaymentFileLoad paymentFile);
058
059 /**
060 * Sends email for a load done internally
061 *
062 * @param batch <code>Batch</code> created by load
063 */
064 public void sendLoadEmail(Batch batch);
065
066 /**
067 * Sends email for a purap bundle that exceeds the maximum number of notes allowed
068 *
069 * @param creditMemos list of credit memo documents in bundle
070 * @param paymentRequests list of payment request documents in bundle
071 * @param lineTotal total number of lines for bundle
072 * @param maxNoteLines maximum number of lines allowed
073 */
074 public void sendExceedsMaxNotesWarningEmail(List<String> creditMemos, List<String> paymentRequests, int lineTotal, int maxNoteLines);
075
076 /**
077 * Sends summary email for an ACH extract
078 *
079 * @param unitCounts Map containing payment counts for each unit
080 * @param unitTotals Map containing total payment amount for each unit
081 * @param extractDate date of ACH extraction
082 */
083 public void sendAchSummaryEmail(Map<String, Integer> unitCounts, Map<String, KualiDecimal> unitTotals, Date extractDate);
084
085 /**
086 * Sends advice notification email to the payee receiving an ACH payment
087 *
088 * @param paymentGroup ACH payment group to send notification for
089 * @param paymentDetail Payment Detail containing payment amounts
090 * @param customer Pdp Customer profile for payment
091 */
092 public void sendAchAdviceEmail(PaymentGroup paymentGroup, PaymentDetail paymentDetail, CustomerProfile customer);
093
094 /**
095 * Sends Payment Cancellation Email
096 *
097 * @param paymentGroup
098 * @param note
099 * @param user
100 */
101 public void sendCancelEmail(PaymentGroup paymentGroup, String note, Person user);
102
103 /**
104 * Reads system parameter indicating whether to status emails should be sent
105 *
106 * @return true if email should be sent, false otherwise
107 */
108 public boolean isPaymentEmailEnabled() ;
109 }