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 org.kuali.kfs.fp.businessobject.DisbursementPayee;
019 import org.kuali.kfs.fp.businessobject.DisbursementVoucherPayeeDetail;
020 import org.kuali.kfs.fp.document.DisbursementVoucherDocument;
021
022 /**
023 * define a set of service methods related to disbursement payee
024 */
025 public interface DisbursementVoucherPayeeService {
026
027 /**
028 * find the payee type description corresponding to the given payee type code
029 *
030 * @param payeeTypeCode the given payee type code
031 * @return the payee type description corresponding to the given payee type code
032 */
033 public String getPayeeTypeDescription(String payeeTypeCode);
034
035 /**
036 * determine whether the given payee is an employee
037 *
038 * @param dvPayeeDetail the given payee
039 * @return true if the given payee is an employee; otherwise, false
040 */
041 public boolean isEmployee(DisbursementVoucherPayeeDetail dvPayeeDetail);
042
043 /**
044 * determine whether the given payee is an employee
045 *
046 * @param payee the given payee
047 * @return true if the given payee is an employee; otherwise, false
048 */
049 public boolean isEmployee(DisbursementPayee payee);
050
051 /**
052 * determine whether the given payee is a vendor
053 *
054 * @param dvPayeeDetail the given payee
055 * @return true if the given payee is a vendor; otherwise, false
056 */
057 public boolean isVendor(DisbursementVoucherPayeeDetail dvPayeeDetail);
058
059 /**
060 * determine whether the given payee is a vendor
061 *
062 * @param payee the given payee
063 * @return true if the given payee is a vendor; otherwise, false
064 */
065 public boolean isVendor(DisbursementPayee payee);
066
067 /**
068 * determine whether the given payee is an individual vendor
069 *
070 * @param dvPayeeDetail the given payee
071 * @return true if the given payee is an individual vendor; otherwise, false
072 */
073 public boolean isPayeeIndividualVendor(DisbursementVoucherPayeeDetail dvPayeeDetail);
074
075 /**
076 * determine whether the given payee is an individual vendor
077 *
078 * @param payee the given payee
079 * @return true if the given payee is an individual vendor; otherwise, false
080 */
081 public boolean isPayeeIndividualVendor(DisbursementPayee payee);
082
083 public void checkPayeeAddressForChanges(DisbursementVoucherDocument dvDoc);
084
085 /**
086 * get the ownership type code if the given payee is a vendor
087 * @param payee the given payee
088 * @return the ownership type code if the given payee is a vendor; otherwise, return null
089 */
090 public String getVendorOwnershipTypeCode(DisbursementPayee payee);
091 }