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.bc.document.service; 017 018 /** 019 * This class defines methods an OrganizationBCDocumentSearchService must provide The OrganizationBCDocumentSearchService provides 020 * methods that build and clean the temporary tables used in the Organization Account (Budget Document) Selection lookups. It is 021 * assumed that the Organization Tree exists and that the user has selected at least one organization before deriving the list of 022 * budgeted accounts (Budget Documents). 023 */ 024 public interface OrganizationBCDocumentSearchService { 025 026 /** 027 * This method populates BudgetConstructionAccountSelect with rows associated with a set of selected organizations in the 028 * Organization Tree for the user and where Budget Documents exist. 029 * 030 * @param principalName 031 * @param universityFiscalYear 032 */ 033 public int buildAccountSelectPullList(String principalName, Integer universityFiscalYear); 034 035 /** 036 * Populates BudgetConstructionAccountSelect with accounts that are above the user's current point of view 037 * and returns the number of rows inserted (which equates to number of accounts above). 038 * 039 * @param principalName user who we are building the list for 040 * @param universityFiscalYear budget year for records to look at 041 * @param chartOfAccountsCode chart code of user's current point of view 042 * @param organizationCode organization code of user's current point of view 043 * @return int number of rows inserted 044 */ 045 public int buildBudgetedAccountsAbovePointsOfView(String principalName, Integer universityFiscalYear, String chartOfAccountsCode, String organizationCode); 046 047 /** 048 * Builds temporary table with accounts that the given user is a manager or delegate for. Returns the number of rows 049 * inserted. 050 * 051 * @param principalName manager or delegate universal identifier 052 * @param universityFiscalYear budget fiscal year 053 */ 054 public int buildAccountManagerDelegateList(String principalName, Integer universityFiscalYear); 055 056 /** 057 * This method depopulates BudgetConstructionAccountSelect rows associated with the user. 058 * 059 * @param principalName 060 * @param universityFiscalYear 061 */ 062 public void cleanAccountSelectPullList(String principalName, Integer universityFiscalYear); 063 } 064