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.fp.batch.service;
017
018 import org.kuali.kfs.fp.document.DisbursementVoucherDocument;
019
020 /**
021 *
022 * This service interface defines the methods that a DisbursementVoucherExtractService implementation must provide.
023 *
024 */
025 public interface DisbursementVoucherExtractService {
026
027 /**
028 * Extract all disbursement vouchers that need to be paid from the database and prepares them for payment.
029 *
030 * @return True if the extraction of payments is successful, false if not.
031 */
032 public boolean extractPayments();
033
034 /**
035 * Cancels a disbursement voucher completely, because its payment has been canceled
036 * @param dv the disbursement voucher to cancel
037 */
038 public abstract void cancelExtractedDisbursementVoucher(DisbursementVoucherDocument dv, java.sql.Date processDate);
039
040 /**
041 * Resets the disbursement voucher so that it can be reextracted
042 * @param dv the disbursement voucher to reset for reextraction
043 */
044 public abstract void resetExtractedDisbursementVoucher(DisbursementVoucherDocument dv, java.sql.Date processDate);
045
046 /**
047 * Returns the disbursement voucher document associated with the given document number
048 * @param documentNumber the id of the document to retrieve
049 * @return the DV document if found, or null
050 */
051 public abstract DisbursementVoucherDocument getDocumentById(String documentNumber);
052
053 /**
054 * Marks a disbursement voucher as paid
055 * @param dv the disbursement voucher to mark
056 * @param processDate the date when the dv was paid
057 */
058 public abstract void markDisbursementVoucherAsPaid(DisbursementVoucherDocument dv, java.sql.Date processDate);
059 }