1 /* 2 * Copyright 2009 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 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.ole.coa.businessobject; 17 18 /** 19 * Wraps an OrganizationReversion detail to make sure that organization reversion returns only 20 * Closed Account details, which in turn will force R2 logic to run for all the details 21 */ 22 public class ClosedAccountOrganizationReversion implements CarryForwardReversionProcessOrganizationInfo { 23 private CarryForwardReversionProcessOrganizationInfo organizationReversion; 24 25 /** 26 * Constructs a ClosedAccountOrganizationReversion 27 * @param organizationReversion the organization reversion to wrap 28 */ 29 public ClosedAccountOrganizationReversion(CarryForwardReversionProcessOrganizationInfo organizationReversion) { 30 this.organizationReversion = organizationReversion; 31 } 32 33 /** 34 * Returns the budget reversion account number from the wrapped org reversion 35 * @see org.kuali.ole.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getBudgetReversionAccountNumber() 36 */ 37 public String getBudgetReversionAccountNumber() { 38 return organizationReversion.getBudgetReversionAccountNumber(); 39 } 40 41 /** 42 * Returns the cash reversion account number from the wrapped org reversion 43 * @see org.kuali.ole.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getCashReversionAccountNumber() 44 */ 45 public String getCashReversionAccountNumber() { 46 return organizationReversion.getCashReversionAccountNumber(); 47 } 48 49 /** 50 * Returns the chart of accounts code from the wrapped org reversion 51 * @see org.kuali.ole.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getChartOfAccountsCode() 52 */ 53 public String getChartOfAccountsCode() { 54 return organizationReversion.getChartOfAccountsCode(); 55 } 56 57 /** 58 * Returns the organization code from the wrapped org reversion 59 * @see org.kuali.ole.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getOrganizationCode() 60 */ 61 public String getOrganizationCode() { 62 return organizationReversion.getOrganizationCode(); 63 } 64 65 /** 66 * Returns a closed account org reversion detail for the given category 67 * @see org.kuali.ole.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getOrganizationReversionDetail(java.lang.String) 68 */ 69 public OrganizationReversionCategoryInfo getOrganizationReversionDetail(String categoryCode) { 70 OrganizationReversionCategoryInfo orgReversionDetail = organizationReversion.getOrganizationReversionDetail(categoryCode); 71 if (orgReversionDetail != null) { 72 return new ClosedAccountOrganizationReversionDetail(orgReversionDetail); 73 } else { 74 return null; 75 } 76 } 77 78 /** 79 * Returns the fiscal year from the wrapped org reversion 80 * @see org.kuali.ole.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getUniversityFiscalYear() 81 */ 82 public Integer getUniversityFiscalYear() { 83 return organizationReversion.getUniversityFiscalYear(); 84 } 85 86 /** 87 * Returns the carry forward by object code indicator from the wrapped org reversion 88 * @see org.kuali.ole.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#isCarryForwardByObjectCodeIndicator() 89 */ 90 public boolean isCarryForwardByObjectCodeIndicator() { 91 return organizationReversion.isCarryForwardByObjectCodeIndicator(); 92 } 93 94 /** 95 * returns the budget reversion chart of accounts code from the wrapped organization reversion 96 * @see org.kuali.ole.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getBudgetReversionChartOfAccountsCode() 97 */ 98 public String getBudgetReversionChartOfAccountsCode() { 99 return organizationReversion.getBudgetReversionChartOfAccountsCode(); 100 } 101 102 /** 103 * returns the cash reversion chart cash object code from the wrapped organization reversion 104 * @see org.kuali.ole.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getCashReversionChartCashObjectCode() 105 */ 106 public String getCashReversionChartCashObjectCode() { 107 return organizationReversion.getCashReversionChartCashObjectCode(); 108 } 109 110 /** 111 * returns the cash reversion chart of accounts code from the wrapped organization reversion 112 * @see org.kuali.ole.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getCashReversionFinancialChartOfAccountsCode() 113 */ 114 public String getCashReversionFinancialChartOfAccountsCode() { 115 return organizationReversion.getCashReversionFinancialChartOfAccountsCode(); 116 } 117 118 /** 119 * returns the organization chart's cash object code from the wrapped organization reversion 120 * @see org.kuali.ole.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getOrganizationChartCashObjectCode() 121 */ 122 public String getOrganizationChartCashObjectCode() { 123 return organizationReversion.getOrganizationChartCashObjectCode(); 124 } 125 }