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 /*
20 * Created on Aug 12, 2004
21 */
22 package org.kuali.kfs.pdp.service;
23
24 import org.kuali.rice.kim.api.identity.Person;
25
26 /**
27 * This class has methods for payment maintenance.
28 */
29 public interface PaymentMaintenanceService {
30
31 /**
32 * This method cancels the pending payment of the given payment id if the following rules apply. -
33 * Payment status must be: "open", "held", or "pending/ACH".
34 * @param paymentGroupId Primary key of the PaymentGroup that the Payment Detail to be canceled belongs to.
35 * @param paymentDetailId Primary key of the PaymentDetail that was actually canceled.
36 * @param note Change note text entered by user.
37 * @param user The user that cancels the payment
38 * @return true if cancel payment succesful, false otherwise
39 */
40 public boolean cancelPendingPayment(Integer paymentGroupId, Integer paymentDetailId, String note, Person user);
41
42 /**
43 * This method holds pending payment of the given payment id if the following rules apply. - Payment status
44 * must be: "open".
45 * @param paymentGroupId Primary key of the PaymentGroup that the Payment Detail to be held belongs to.
46 * @param note Change note text entered by user.
47 * @param user The user that holds the payment
48 */
49 public boolean holdPendingPayment(Integer paymentGroupId, String note, Person user);
50
51 /**
52 * This method removes holds on pending payments of the given payment id if the following rules
53 * apply. - Payment status must be: "held".
54 *
55 * @param paymentGroupId Primary key of the PaymentGroup that the Payment Detail to be un-held belongs to
56 * @param note Change note text entered by user.
57 * @param user the user that removes hold on payment
58 */
59 public boolean removeHoldPendingPayment(Integer paymentGroupId, String note, Person user);
60
61 /**
62 * This method cancels all disbursements with the same disbursment number as that of the given payment id
63 * if the following rules apply. - Payment status must be: "extr".
64 * @param paymentGroupId Primary key of the PaymentGroup that the Payment Detail to be cancelled belongs to.
65 * @param paymentDetailId Primary key of the PaymentDetail that was actually cancelled.
66 * @param note Change note text entered by user.
67 * @param user The user that cancels the disbursement
68 */
69 public boolean cancelDisbursement(Integer paymentGroupId, Integer paymentDetailId, String note, Person user);
70
71 /**
72 * This method re-opens all disbursements with the same disbursment number as that of
73 * the given payment id if the following rules apply. - Payment status must be: "cdis".
74 * @param paymentGroupId Primary key of the PaymentGroup that the Payment Detail to be canceled/reissued belongs to.
75 * @param changeText Change note text entered by user.
76 * @param user The user that cancels/reissues disbursement
77 */
78 public boolean reissueDisbursement(Integer paymentGroupId, String changeText, Person user);
79
80 /**
81 * This method cancels and re-opens all disbursements with the same disbursment number as that of
82 * the given payment id if the following rules apply. - Payment status must be: "extr".
83 * @param paymentGroupId Primary key of the PaymentGroup that the Payment Detail to be canceled/reissued belongs to.
84 * @param changeText Change note text entered by user.
85 * @param user The user that cancels/reissues disbursement
86 */
87 public boolean cancelReissueDisbursement(Integer paymentGroupId, String changeText, Person user);
88
89 /**
90 * This method changes the immediate flag
91 * @param paymentGroupId the payment group id
92 * @param changeText the change text
93 * @param user the user that changes the immediate flag
94 */
95 public void changeImmediateFlag(Integer paymentGroupId, String changeText, Person user);
96 }
97