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.document.service;
017
018 import java.util.List;
019
020 import org.kuali.kfs.fp.businessobject.DisbursementPayee;
021 import org.kuali.kfs.fp.businessobject.PaymentReasonCode;
022 import org.kuali.rice.kns.util.MessageList;
023
024 /**
025 * define a set of service methods related to payment reason code
026 */
027 public interface DisbursementVoucherPaymentReasonService {
028
029 /**
030 * determine whether the given payee is qualified for the payment with the given reason code
031 *
032 * @param payee the given payee
033 * @param paymentReasonCode the givne payment reason code
034 * @return true if the given payee is qualified for the payment with the given reason code; otherwise, return false
035 */
036 public boolean isPayeeQualifiedForPayment(DisbursementPayee payee, String paymentReasonCode);
037
038 /**
039 * determine whether the given payee is qualified for the payment with the given reason code and the payee type must be in the
040 * given payee type code list.
041 *
042 * @param payee the given payee
043 * @param paymentReasonCode the givne payment reason code
044 * @param payeeTypeCodes the given payee type codes
045 * @return true if the given payee is qualified for the payment with the given reason code; otherwise, return false
046 */
047 public boolean isPayeeQualifiedForPayment(DisbursementPayee payee, String paymentReasonCode, List<String> payeeTypeCodes);
048
049 /**
050 * determine whether the given payment reason is a non-employee travel payment reason
051 *
052 * @param paymentReasonCode the givne payment reason code
053 * @return true if the given payment reason is a moving payment reason; otherwise, return false
054 */
055 public boolean isNonEmployeeTravelPaymentReason(String paymentReasonCode);
056
057 /**
058 * determine whether the given payment reason is a moving payment reason
059 *
060 * @param paymentReasonCode the givne payment reason code
061 * @return true if the given payment reason is a moving payment reason; otherwise, return false
062 */
063 public boolean isMovingPaymentReason(String paymentReasonCode);
064
065 /**
066 * determine whether the given payment reason is a prepaid travel payment reason
067 *
068 * @param paymentReasonCode the givne payment reason code
069 * @return true if the given payment reason is a prepaid travel payment reason; otherwise, return false
070 */
071 public boolean isPrepaidTravelPaymentReason(String paymentReasonCode);
072
073 /**
074 * determine whether the given payment reason is a research payment reason
075 *
076 * @param paymentReasonCode the givne payment reason code
077 * @return true if the given payment reason is a research payment reason; otherwise, return false
078 */
079 public boolean isResearchPaymentReason(String paymentReasonCode);
080
081 /**
082 * determine whether the given payment reason is a revolving fund payment reason
083 *
084 * @param paymentReasonCode the givne payment reason code
085 * @return true if the given payment reason is a revolving fund payment reason; otherwise, return false
086 */
087 public boolean isRevolvingFundPaymentReason(String paymentReasonCode);
088
089 /**
090 * determine whether the given payment reason is a decedent compensation payment reason
091 *
092 * @param paymentReasonCode the givne payment reason code
093 * @return true if the given payment reason is a decedent compensation payment reason; otherwise, return false
094 */
095 public boolean isDecedentCompensationPaymentReason(String paymentReasonCode);
096
097 /**
098 * determine whether the given payment reason is of type that is specified by the given type parameter name. The type parameter
099 * must be defined as an application parameter(@see org.kuali.rice.kns.bo.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 List<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 List<String> getVendorOwnershipTypesByPaymentReason(String paymentReasonCode);
153 }