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 /*
017 * Created on Aug 12, 2004
018 */
019 package org.kuali.kfs.pdp.service;
020
021 import org.kuali.rice.kim.bo.Person;
022
023 /**
024 * This class has methods for payment maintenance.
025 */
026 public interface PaymentMaintenanceService {
027
028 /**
029 * This method cancels the pending payment of the given payment id if the following rules apply. -
030 * Payment status must be: "open", "held", or "pending/ACH".
031 * @param paymentGroupId Primary key of the PaymentGroup that the Payment Detail to be canceled belongs to.
032 * @param paymentDetailId Primary key of the PaymentDetail that was actually canceled.
033 * @param note Change note text entered by user.
034 * @param user The user that cancels the payment
035 * @return true if cancel payment succesful, false otherwise
036 */
037 public boolean cancelPendingPayment(Integer paymentGroupId, Integer paymentDetailId, String note, Person user);
038
039 /**
040 * This method holds pending payment of the given payment id if the following rules apply. - Payment status
041 * must be: "open".
042 * @param paymentGroupId Primary key of the PaymentGroup that the Payment Detail to be held belongs to.
043 * @param note Change note text entered by user.
044 * @param user The user that holds the payment
045 */
046 public boolean holdPendingPayment(Integer paymentGroupId, String note, Person user);
047
048 /**
049 * This method removes holds on pending payments of the given payment id if the following rules
050 * apply. - Payment status must be: "held".
051 *
052 * @param paymentGroupId Primary key of the PaymentGroup that the Payment Detail to be un-held belongs to
053 * @param note Change note text entered by user.
054 * @param user the user that removes hold on payment
055 */
056 public boolean removeHoldPendingPayment(Integer paymentGroupId, String note, Person user);
057
058 /**
059 * This method cancels all disbursements with the same disbursment number as that of the given payment id
060 * if the following rules apply. - Payment status must be: "extr".
061 * @param paymentGroupId Primary key of the PaymentGroup that the Payment Detail to be cancelled belongs to.
062 * @param paymentDetailId Primary key of the PaymentDetail that was actually cancelled.
063 * @param note Change note text entered by user.
064 * @param user The user that cancels the disbursement
065 */
066 public boolean cancelDisbursement(Integer paymentGroupId, Integer paymentDetailId, String note, Person user);
067
068 /**
069 * This method cancels and re-opens all disbursements with the same disbursment number as that of
070 * the given payment id if the following rules apply. - Payment status must be: "extr".
071 * @param paymentGroupId Primary key of the PaymentGroup that the Payment Detail to be canceled/reissued belongs to.
072 * @param changeText Change note text entered by user.
073 * @param user The user that cancels/reissues disbursement
074 */
075 public boolean cancelReissueDisbursement(Integer paymentGroupId, String changeText, Person user);
076
077 /**
078 * This method changes the immediate flag
079 * @param paymentGroupId the payment group id
080 * @param changeText the change text
081 * @param user the user that changes the immediate flag
082 */
083 public void changeImmediateFlag(Integer paymentGroupId, String changeText, Person user);
084 }
085