1 /*
2 * The Kuali Financial System, a comprehensive financial management system for higher education.
3 *
4 * Copyright 2005-2014 The Kuali Foundation
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 package org.kuali.kfs.module.bc.document.service.impl;
20
21 import org.kuali.kfs.module.bc.document.dataaccess.BudgetOrganizationPushPullDao;
22 import org.kuali.kfs.module.bc.document.service.BudgetPushPullService;
23 import org.springframework.transaction.annotation.Transactional;
24
25 /**
26 * Implements BudgetPushPullService by populating temporary tables with the potential set of documents to push down or pull up.
27 * The temporary tables are then used to drive the entire push down or pull up process. First, an attempt is made to place
28 * budget locks on each document. Successfully locked documents are then pushed down or pulled up by setting the associated
29 * BudgetConstructionHeader (ld_bcnstr_hdr_t) row with the appropriate level attribute values and releasing the locks.
30 */
31 @Transactional
32 public class BudgetPushPullServiceImpl implements BudgetPushPullService {
33 private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(BudgetPushPullServiceImpl.class);
34
35 protected BudgetOrganizationPushPullDao budgetOrganizationPushPullDao;
36
37 /**
38 * @see org.kuali.kfs.module.bc.document.service.BudgetPushPullService#pullupSelectedOrganizationDocuments(java.lang.String, java.lang.Integer, java.lang.String, java.lang.String)
39 */
40 public void pullupSelectedOrganizationDocuments(String principalId, Integer FiscalYear, String pointOfViewCharOfAccountsCode, String pointOfViewOrganizationCode) {
41 budgetOrganizationPushPullDao.pullupSelectedOrganizationDocuments(principalId, FiscalYear, pointOfViewCharOfAccountsCode, pointOfViewOrganizationCode);
42 }
43
44 /**
45 * @see org.kuali.kfs.module.bc.document.service.BudgetPushPullService#pushdownSelectedOrganizationDocuments(java.lang.String, java.lang.Integer, java.lang.String, java.lang.String)
46 */
47 public void pushdownSelectedOrganizationDocuments(String principalId, Integer FiscalYear, String pointOfViewCharOfAccountsCode, String pointOfViewOrganizationCode) {
48 budgetOrganizationPushPullDao.pushdownSelectedOrganizationDocuments(principalId, FiscalYear, pointOfViewCharOfAccountsCode, pointOfViewOrganizationCode);
49 }
50
51 /**
52 * @see org.kuali.kfs.module.bc.document.service.BudgetPushPullService#buildPullUpBudgetedDocuments(java.lang.String, java.lang.Integer, java.lang.String, java.lang.String)
53 */
54 public int buildPullUpBudgetedDocuments(String principalId, Integer FiscalYear, String pointOfViewCharOfAccountsCode, String pointOfViewOrganizationCode) {
55 return budgetOrganizationPushPullDao.buildPullUpBudgetedDocuments(principalId, FiscalYear, pointOfViewCharOfAccountsCode, pointOfViewOrganizationCode);
56 }
57
58 /**
59 * @see org.kuali.kfs.module.bc.document.service.BudgetPushPullService#buildPushDownBudgetedDocuments(java.lang.String, java.lang.Integer, java.lang.String, java.lang.String)
60 */
61 public int buildPushDownBudgetedDocuments(String principalId, Integer FiscalYear, String pointOfViewCharOfAccountsCode, String pointOfViewOrganizationCode) {
62 return budgetOrganizationPushPullDao.buildPushDownBudgetedDocuments(principalId, FiscalYear, pointOfViewCharOfAccountsCode, pointOfViewOrganizationCode);
63 }
64
65 /**
66 * Sets the budgetOrganizationPushPullDao attribute value.
67 * @param budgetOrganizationPushPullDao The budgetOrganizationPushPullDao to set.
68 */
69 public void setBudgetOrganizationPushPullDao(BudgetOrganizationPushPullDao budgetOrganizationPushPullDao) {
70 this.budgetOrganizationPushPullDao = budgetOrganizationPushPullDao;
71 }
72
73
74
75 }
76