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.pdp.service;
17  
18  import java.sql.Date;
19  import java.util.Iterator;
20  import java.util.List;
21  
22  import org.kuali.ole.pdp.businessobject.PaymentGroup;
23  import org.kuali.ole.pdp.businessobject.PaymentProcess;
24  import org.kuali.rice.coreservice.framework.parameter.ParameterService;
25  import org.kuali.rice.kns.service.DataDictionaryService;
26  
27  public interface PaymentGroupService {
28      /**
29       * Get all payment groups by a disbursement type code and status code
30       * 
31       * @param disbursementType
32       * @param paymentStatusCode
33       * @return
34       */
35      public Iterator getByDisbursementTypeStatusCode(String disbursementType, String paymentStatusCode);
36  
37      /**
38       * Get all payment groups by Payment Process object
39       * 
40       * @param p
41       * @return
42       */
43      public Iterator getByProcess(PaymentProcess p);
44  
45      /**
46       * Get all payment groups by Payment Process Id/Disbursement Type
47       * 
48       * @param pid
49       * @param disbursementType
50       * @return
51       */
52      public List<Integer> getDisbursementNumbersByDisbursementType(Integer pid,String disbursementType);
53      
54      /**
55       * Get all payment groups by Payment Process Id/Disbursement Type for a given bank code
56       * 
57       * @param pid
58       * @param disbursementType
59       * @param bankCode
60       * @return
61       */
62      public abstract List<Integer> getDisbursementNumbersByDisbursementTypeAndBankCode(Integer pid,String disbursementType, String bankCode);
63      
64      /**
65       * Given a process id and a disbursement type, finds a distinct list of bank codes used by payment groups within that payment process
66       * @param pid payment process to query payment groups of
67       * @param disbursementType the type of disbursements to query
68       * @return a sorted List of bank codes
69       */
70      public abstract List<String> getDistinctBankCodesForProcessAndType(Integer pid, String disbursementType);
71      
72      public PaymentGroup get(Integer id);
73  
74      public List getByBatchId(Integer batchId);
75  
76      public List getByDisbursementNumber(Integer disbursementNbr);
77  
78      /**
79       * Mark a paid group as processed
80       * 
81       * @param group
82       * @param processDate
83       */
84      public void processPaidGroup(PaymentGroup group, Date processDate);
85  
86      /**
87       * Mark a cancelled group as processed
88       * 
89       * @param group
90       * @param processDate
91       */
92      public void processCancelledGroup(PaymentGroup group, Date processDate);
93      
94      /**
95       * Gets the sort group id
96       * 
97       * @param paymentGroup
98       * @return
99       */
100     public int getSortGroupId(PaymentGroup paymentGroup);
101     
102     /**
103      * Gets the sort group name
104      * 
105      * @param sortGroupId
106      * @return
107      */
108     public String getSortGroupName(int sortGroupId);
109     
110     /**
111      * Sets the parameter service
112      * 
113      * @param parameterService
114      */
115     public void setParameterService(ParameterService parameterService);
116     
117     /**
118      * Sets DataDictionaryService
119      * 
120      * @param dataDictionaryService
121      */
122     public void setDataDictionaryService(DataDictionaryService dataDictionaryService);
123     
124     /**
125      * Gets list of ach payments in which an advice notification has not been sent
126      * 
127      * @return List<PaymentGroup>
128      */
129     public List<PaymentGroup> getAchPaymentsNeedingAdviceNotification();
130 }