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.module.ld.service;
017
018 import org.kuali.kfs.integration.ld.LaborLedgerObject;
019 import org.kuali.kfs.module.ld.businessobject.BenefitsCalculation;
020 import org.kuali.kfs.module.ld.businessobject.PositionObjectBenefit;
021 import org.kuali.rice.kns.util.KualiDecimal;
022
023 /**
024 * The interface provides its clients with access to the benefit calculation.
025 *
026 * @see org.kuali.kfs.module.ld.businessobject.BenefitsCalculation
027 */
028 public interface LaborBenefitsCalculationService {
029
030 /**
031 * get the benefit calculation object based on the given information
032 *
033 * @param universityFiscalYear the given fiscal year
034 * @param chartOfAccountsCode the given chart of accounts code
035 * @param benefitTypeCode the given benefit type code
036 * @return the benefit calculation object matching the given information
037 */
038 public BenefitsCalculation getBenefitsCalculation(Integer universityFiscalYear, String chartOfAccountsCode, String benefitTypeCode);
039
040 /**
041 * calculate the fringe benefit amount for the given labor object and salary amount
042 *
043 * @param laborLedgerObject the given labor object
044 * @param salaryAmount the given salary amount
045 * @return the fringe benefit amount for the given labor object and salary amount
046 */
047 public KualiDecimal calculateFringeBenefit(LaborLedgerObject laborLedgerObject, KualiDecimal salaryAmount);
048
049 /**
050 * calculate the fringe benefit amount for the given object code and salary amount
051 *
052 * @param fiscalYear the year for object code record
053 * @param chartCode the chart for object code record
054 * @param objectCode the object code
055 * @param salaryAmount amount to calculate benefits for
056 * @return the fringe benefit amount
057 */
058 public KualiDecimal calculateFringeBenefit(Integer fiscalYear, String chartCode, String objectCode, KualiDecimal salaryAmount);
059
060 /**
061 * calculate the fringe benefit amount from the given position object benefit and salary amount
062 *
063 * @param positionObjectBenefit the given position object benefit
064 * @param salaryAmount the given salary amount
065 * @return the fringe benefit amount for the given position object benefit and salary amount
066 */
067 public KualiDecimal calculateFringeBenefit(PositionObjectBenefit positionObjectBenefit, KualiDecimal salaryAmount);
068 }