01: /*
02: * Copyright 2006-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.module.kra.budget.service;
17:
18: import java.util.List;
19:
20: import org.kuali.module.kra.budget.bo.BudgetInstitutionCostShare;
21: import org.kuali.module.kra.budget.bo.BudgetThirdPartyCostShare;
22: import org.kuali.module.kra.budget.bo.BudgetUser;
23: import org.kuali.module.kra.budget.bo.InstitutionCostSharePersonnel;
24:
25: /**
26: * This interface defines methods that a BudgetCostShareService must provide.
27: */
28: public interface BudgetCostShareService {
29:
30: /**
31: * This method will remove institutionCostSharePersonnel entries that no longer have a personnel entry. It will also remove the
32: * entire budgetInstitutionCostShare list if institutionCostShareIndicator is not set anymore. The same goes for
33: * budgetThirdPartyCostShare and budgetThirdPartyCostShareIndicator.
34: *
35: * @param institutionCostShareIndicator if budgetInstitutionCostShare should be removed
36: * @param budgetInstitutionCostShare
37: * @param budgetThirdPartyCostShareIndicator if budgetThirdPartyCostShare should be removed
38: * @param budgetThirdPartyCostShare
39: * @param personnel list of personnel to check for chart / orgs
40: * @param institutionCostSharePersonnel chart / orgs to be removed if they arn't present in personnel list
41: */
42: public void cleanseCostShare(
43: boolean institutionCostShareIndicator,
44: List<BudgetInstitutionCostShare> budgetInstitutionCostShare,
45: boolean budgetThirdPartyCostShareIndicator,
46: List<BudgetThirdPartyCostShare> budgetThirdPartyCostShare,
47: List<BudgetUser> personnel,
48: List<InstitutionCostSharePersonnel> institutionCostSharePersonnel);
49:
50: /**
51: * This method will add Institution Cost Share Personnel entries that have personnel entries if they don't already exist. It
52: * does not add entries that don't have a chart or org set (this happens for TO BE NAMEDs).
53: *
54: * @param documentNumber
55: * @param personnel
56: * @param institutionCostSharePersonnel
57: */
58: public void reconcileCostShare(
59: String documentNumber,
60: List<BudgetUser> personnel,
61: List<InstitutionCostSharePersonnel> institutionCostSharePersonnel);
62: }
|