View Javadoc

1   /*
2    * Copyright 2008 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.pdp.service;
17  
18  import java.util.Date;
19  import java.util.List;
20  import java.util.Map;
21  
22  import org.kuali.ole.fp.document.DisbursementVoucherDocument;
23  import org.kuali.ole.pdp.businessobject.Batch;
24  import org.kuali.ole.pdp.businessobject.CustomerProfile;
25  import org.kuali.ole.pdp.businessobject.PaymentDetail;
26  import org.kuali.ole.pdp.businessobject.PaymentFileLoad;
27  import org.kuali.ole.pdp.businessobject.PaymentGroup;
28  import org.kuali.rice.core.api.util.type.KualiDecimal;
29  import org.kuali.rice.kim.api.identity.Person;
30  import org.kuali.rice.krad.util.MessageMap;
31  
32  /**
33   * Defines methods for sending PDP emails.
34   */
35  public interface PdpEmailService {
36  
37      /**
38       * Sends email for a payment load has failed. Errors encountered will be printed out in message
39       * 
40       * @param paymentFile parsed payment file object (might not be populated completely due to errors)
41       * @param errors <code>MessageMap</code> containing <code>ErrorMessage</code> entries
42       */
43      public void sendErrorEmail(PaymentFileLoad paymentFile, MessageMap errors);
44  
45      /**
46       * Sends email for a successful payment load. Warnings encountered will be printed out in message
47       * 
48       * @param paymentFile parsed payment file object
49       * @param warnings <code>List</code> of <code>String</code> messages
50       */
51      public void sendLoadEmail(PaymentFileLoad paymentFile, List<String> warnings);
52  
53      /**
54       * Sends email for a payment load that was held due to tax reasons
55       * 
56       * @param paymentFile parsed payment file object
57       */
58      public void sendTaxEmail(PaymentFileLoad paymentFile);
59  
60      /**
61       * Sends email for a load done internally
62       * 
63       * @param batch <code>Batch</code> created by load
64       */
65      public void sendLoadEmail(Batch batch);
66  
67      /**
68       * Sends email for a purap bundle that exceeds the maximum number of notes allowed
69       * 
70       * @param creditMemos list of credit memo documents in bundle
71       * @param paymentRequests list of payment request documents in bundle
72       * @param lineTotal total number of lines for bundle
73       * @param maxNoteLines maximum number of lines allowed
74       */
75      public void sendExceedsMaxNotesWarningEmail(List<String> creditMemos, List<String> paymentRequests, int lineTotal, int maxNoteLines);
76  
77      /**
78       * Sends summary email for an ACH extract
79       * 
80       * @param unitCounts Map containing payment counts for each unit
81       * @param unitTotals Map containing total payment amount for each unit
82       * @param extractDate date of ACH extraction
83       */
84      public void sendAchSummaryEmail(Map<String, Integer> unitCounts, Map<String, KualiDecimal> unitTotals, Date extractDate);
85  
86      /**
87       * Sends advice notification email to the payee receiving an ACH payment
88       * 
89       * @param paymentGroup ACH payment group to send notification for
90       * @param paymentDetail Payment Detail containing payment amounts
91       * @param customer Pdp Customer profile for payment
92       */
93      public void sendAchAdviceEmail(PaymentGroup paymentGroup, PaymentDetail paymentDetail, CustomerProfile customer);
94      
95      /**
96       * Sends Payment Cancellation Email
97       * 
98       * @param paymentGroup
99       * @param note
100      * @param user
101      */
102     public void sendCancelEmail(PaymentGroup paymentGroup, String note, Person user);
103     
104     /**
105      * Reads system parameter indicating whether to status emails should be sent
106      * 
107      * @return true if email should be sent, false otherwise
108      */
109     public boolean isPaymentEmailEnabled() ;
110     
111     /**
112      * Sends notification e-mail that an immediate extract Disbursement Voucher has been extracted
113      * @param disbursementVoucher the disbursement voucher which was immediately extracted
114      * @param user the current extracting user
115      */
116     public void sendDisbursementVoucherImmediateExtractEmail(DisbursementVoucherDocument disbursementVoucher, Person user);
117 }