1 /*
2 * Copyright 2008 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.document.service;
17
18 import java.util.Collection;
19
20 import org.kuali.ole.fp.businessobject.DisbursementPayee;
21 import org.kuali.ole.fp.businessobject.PaymentReasonCode;
22 import org.kuali.rice.kns.util.MessageList;
23
24 /**
25 * define a set of service methods related to payment reason code
26 */
27 public interface DisbursementVoucherPaymentReasonService {
28
29 /**
30 * determine whether the given payee is qualified for the payment with the given reason code
31 *
32 * @param payee the given payee
33 * @param paymentReasonCode the givne payment reason code
34 * @return true if the given payee is qualified for the payment with the given reason code; otherwise, return false
35 */
36 public boolean isPayeeQualifiedForPayment(DisbursementPayee payee, String paymentReasonCode);
37
38 /**
39 * determine whether the given payee is qualified for the payment with the given reason code and the payee type must be in the
40 * given payee type code list.
41 *
42 * @param payee the given payee
43 * @param paymentReasonCode the givne payment reason code
44 * @param payeeTypeCodes the given payee type codes
45 * @return true if the given payee is qualified for the payment with the given reason code; otherwise, return false
46 */
47 public boolean isPayeeQualifiedForPayment(DisbursementPayee payee, String paymentReasonCode, Collection<String> payeeTypeCodes);
48
49 /**
50 * determine whether the given payment reason is a non-employee travel payment reason
51 *
52 * @param paymentReasonCode the givne payment reason code
53 * @return true if the given payment reason is a moving payment reason; otherwise, return false
54 */
55 public boolean isNonEmployeeTravelPaymentReason(String paymentReasonCode);
56
57 /**
58 * determine whether the given payment reason is a moving payment reason
59 *
60 * @param paymentReasonCode the givne payment reason code
61 * @return true if the given payment reason is a moving payment reason; otherwise, return false
62 */
63 public boolean isMovingPaymentReason(String paymentReasonCode);
64
65 /**
66 * determine whether the given payment reason is a prepaid travel payment reason
67 *
68 * @param paymentReasonCode the givne payment reason code
69 * @return true if the given payment reason is a prepaid travel payment reason; otherwise, return false
70 */
71 public boolean isPrepaidTravelPaymentReason(String paymentReasonCode);
72
73 /**
74 * determine whether the given payment reason is a research payment reason
75 *
76 * @param paymentReasonCode the givne payment reason code
77 * @return true if the given payment reason is a research payment reason; otherwise, return false
78 */
79 public boolean isResearchPaymentReason(String paymentReasonCode);
80
81 /**
82 * determine whether the given payment reason is a revolving fund payment reason
83 *
84 * @param paymentReasonCode the givne payment reason code
85 * @return true if the given payment reason is a revolving fund payment reason; otherwise, return false
86 */
87 public boolean isRevolvingFundPaymentReason(String paymentReasonCode);
88
89 /**
90 * determine whether the given payment reason is a decedent compensation payment reason
91 *
92 * @param paymentReasonCode the givne payment reason code
93 * @return true if the given payment reason is a decedent compensation payment reason; otherwise, return false
94 */
95 public boolean isDecedentCompensationPaymentReason(String paymentReasonCode);
96
97 /**
98 * determine whether the given payment reason is of type that is specified by the given type parameter name. The type parameter
99 * must be defined as an application parameter(@see org.kuali.rice.core.api.parameter.Parameter)
100 *
101 * @param typeParameterName the given type parameter name
102 * @param paymentReasonCode the given reason code
103 * @return true if the given payment reason is of type that is specified by typeParameterName; otherwise, false
104 */
105 public boolean isPaymentReasonOfType(String typeParameterName, String paymentReasonCode);
106
107 /**
108 * get the payment limit to research non-vendor employee for research payment reason
109 *
110 * @return the payment limit to research non-vendor employee for research payment reason.
111 */
112 public String getReserchNonVendorPayLimit();
113
114 /**
115 * get the payee type codes valid for the given payment reason
116 *
117 * @param paymentReasonCode the given payment reason
118 * @return the payee type codes valid for the given payment reason
119 */
120 public Collection<String> getPayeeTypesByPaymentReason(String paymentReasonCode);
121
122 /**
123 * get the payment reason with its primary key: the given payment reason code
124 *
125 * @param paymentReasonCode the given payment reason
126 * @return the payment reason with its primary key: the given payment reason code
127 */
128 public PaymentReasonCode getPaymentReasonByPrimaryId(String paymentReasonCode);
129
130 /**
131 * post the usage of the given payment reason code into error map
132 *
133 * @param paymentReasonCode the given payment reason code
134 * @param messageList the message list that will hold the usage of the given payment reason
135 */
136 public void postPaymentReasonCodeUsage(String paymentReasonCode, MessageList messageList);
137
138 /**
139 * determine whether the given payment reason is required for tax review
140 *
141 * @param paymentReasonCode the given payment reason
142 * @return true if the given payment reason is required for tax review; otherwise, false
143 */
144 public boolean isTaxReviewRequired(String paymentReasonCode);
145
146 /**
147 * get the vendor owership type codes for the given payment reason code
148 *
149 * @param paymentReasonCode the given payment reason code
150 * @return the vendor owership type codes for the given payment reason code if any; otherwise, null
151 */
152 public Collection<String> getVendorOwnershipTypesByPaymentReason(String paymentReasonCode);
153 }