View Javadoc
1   /*
2    * Copyright 2007 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.fp.batch.service;
17  
18  import org.kuali.ole.fp.document.DisbursementVoucherDocument;
19  
20  /**
21   * 
22   * This service interface defines the methods that a DisbursementVoucherExtractService implementation must provide.
23   * 
24   */
25  public interface DisbursementVoucherExtractService {
26      
27      /**
28       * Extract all disbursement vouchers that need to be paid from the database and prepares them for payment.
29       * 
30       * @return True if the extraction of payments is successful, false if not.
31       */
32      public boolean extractPayments();
33      
34      /**
35       * Pulls all disbursement voucher which pay checks and which are marked as "immediate payment" from the database and builds payment information for them 
36       * @deprecated this method is not used in batch any longer (immediate extract of DV's occurs in the DV's own route status change handler) and the code seems a bit fishy at this point, so likely, institutions shouldn't be using this
37       */
38      public void extractImmediatePayments();
39      
40      /**
41       * Cancels a disbursement voucher completely, because its payment has been canceled
42       * @param dv the disbursement voucher to cancel
43       */
44      public abstract void cancelExtractedDisbursementVoucher(DisbursementVoucherDocument dv, java.sql.Date processDate);
45      
46      /**
47       * Resets the disbursement voucher so that it can be reextracted
48       * @param dv the disbursement voucher to reset for reextraction
49       */
50      public abstract void resetExtractedDisbursementVoucher(DisbursementVoucherDocument dv, java.sql.Date processDate);
51      
52      /**
53       * Returns the disbursement voucher document associated with the given document number
54       * @param documentNumber the id of the document to retrieve
55       * @return the DV document if found, or null
56       */
57      public abstract DisbursementVoucherDocument getDocumentById(String documentNumber);
58      
59      /**
60       * Marks a disbursement voucher as paid
61       * @param dv the disbursement voucher to mark
62       * @param processDate the date when the dv was paid
63       */
64      public abstract void markDisbursementVoucherAsPaid(DisbursementVoucherDocument dv, java.sql.Date processDate);
65      
66      /**
67       * Creates a batch payment for a single disbursement voucher
68       * @param disbursementVoucher the voucher to immediately extract
69       */
70      public abstract void extractImmediatePayment(DisbursementVoucherDocument disbursementVoucher);
71  }