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 import java.util.List; 019 020 import org.kuali.kfs.module.bc.businessobject.BudgetConstructionPullup; 021 022 /** 023 * This interface defines methods that manipulate objects used by the Organization Selection screens. Manipulated objects include 024 * BudgetConstructionPullup with methods that populate and depopulate the associated table for a specific user. 025 */ 026 public interface BudgetOrganizationTreeService { 027 028 /** 029 * This method populates BudgetConstructionPullup with rows that represent the subtree of the passed in point of view 030 * organization for a user. All organizations reporting to the point of view are inserted. 031 * 032 * @param principalName 033 * @param chartOfAccountsCode 034 * @param organizationCode 035 */ 036 public void buildPullup(String principalName, String chartOfAccountsCode, String organizationCode); 037 038 /** 039 * This method populates BudgetConstructionPullup with rows that represent the subtree of the passed in point of view 040 * organization for a user. All organizations reporting to the point of view are inserted. 041 * This uses raw SQL 042 * 043 * @param principalName 044 * @param chartOfAccountsCode 045 * @param organizationCode 046 */ 047 public void buildPullupSql(String principalName, String chartOfAccountsCode, String organizationCode); 048 049 /** 050 * This method depopulates BudgetConstructionPullup of any rows associated with the user 051 * 052 * @param principalName 053 */ 054 public void cleanPullup(String principalName); 055 056 /** 057 * This method returns a list of child organizations for the passed in organization and user 058 * 059 * @param principalId 060 * @param chartOfAccountsCode 061 * @param organizationCode 062 * @return 063 */ 064 public List<BudgetConstructionPullup> getPullupChildOrgs(String principalId, String chartOfAccountsCode, String organizationCode); 065 066 /** 067 * This method resets the pullflag for the BudgetConstructionPullup set of records owned by the user 068 * 069 * @param principalId 070 */ 071 public void resetPullFlag(String principalId); 072 073 /** 074 * This method returns a list of selected BudgetConstructionPullup rows for the user. 075 * 076 * @param principalId 077 * @return 078 */ 079 public List<BudgetConstructionPullup> getSelectedOrgs(String principalId); 080 } 081