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.coa.businessobject;
017
018 /**
019 * Wraps an OrganizationReversion detail to make sure that organization reversion returns only
020 * Closed Account details, which in turn will force R2 logic to run for all the details
021 */
022 public class ClosedAccountOrganizationReversion implements CarryForwardReversionProcessOrganizationInfo {
023 private CarryForwardReversionProcessOrganizationInfo organizationReversion;
024
025 /**
026 * Constructs a ClosedAccountOrganizationReversion
027 * @param organizationReversion the organization reversion to wrap
028 */
029 public ClosedAccountOrganizationReversion(CarryForwardReversionProcessOrganizationInfo organizationReversion) {
030 this.organizationReversion = organizationReversion;
031 }
032
033 /**
034 * Returns the budget reversion account number from the wrapped org reversion
035 * @see org.kuali.kfs.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getBudgetReversionAccountNumber()
036 */
037 public String getBudgetReversionAccountNumber() {
038 return organizationReversion.getBudgetReversionAccountNumber();
039 }
040
041 /**
042 * Returns the cash reversion account number from the wrapped org reversion
043 * @see org.kuali.kfs.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getCashReversionAccountNumber()
044 */
045 public String getCashReversionAccountNumber() {
046 return organizationReversion.getCashReversionAccountNumber();
047 }
048
049 /**
050 * Returns the chart of accounts code from the wrapped org reversion
051 * @see org.kuali.kfs.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getChartOfAccountsCode()
052 */
053 public String getChartOfAccountsCode() {
054 return organizationReversion.getChartOfAccountsCode();
055 }
056
057 /**
058 * Returns the organization code from the wrapped org reversion
059 * @see org.kuali.kfs.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getOrganizationCode()
060 */
061 public String getOrganizationCode() {
062 return organizationReversion.getOrganizationCode();
063 }
064
065 /**
066 * Returns a closed account org reversion detail for the given category
067 * @see org.kuali.kfs.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getOrganizationReversionDetail(java.lang.String)
068 */
069 public OrganizationReversionCategoryInfo getOrganizationReversionDetail(String categoryCode) {
070 OrganizationReversionCategoryInfo orgReversionDetail = organizationReversion.getOrganizationReversionDetail(categoryCode);
071 if (orgReversionDetail != null) {
072 return new ClosedAccountOrganizationReversionDetail(orgReversionDetail);
073 } else {
074 return null;
075 }
076 }
077
078 /**
079 * Returns the fiscal year from the wrapped org reversion
080 * @see org.kuali.kfs.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getUniversityFiscalYear()
081 */
082 public Integer getUniversityFiscalYear() {
083 return organizationReversion.getUniversityFiscalYear();
084 }
085
086 /**
087 * Returns the carry forward by object code indicator from the wrapped org reversion
088 * @see org.kuali.kfs.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#isCarryForwardByObjectCodeIndicator()
089 */
090 public boolean isCarryForwardByObjectCodeIndicator() {
091 return organizationReversion.isCarryForwardByObjectCodeIndicator();
092 }
093
094 /**
095 * returns the budget reversion chart of accounts code from the wrapped organization reversion
096 * @see org.kuali.kfs.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getBudgetReversionChartOfAccountsCode()
097 */
098 public String getBudgetReversionChartOfAccountsCode() {
099 return organizationReversion.getBudgetReversionChartOfAccountsCode();
100 }
101
102 /**
103 * returns the cash reversion chart cash object code from the wrapped organization reversion
104 * @see org.kuali.kfs.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.kfs.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.kfs.coa.businessobject.CarryForwardReversionProcessOrganizationInfo#getOrganizationChartCashObjectCode()
121 */
122 public String getOrganizationChartCashObjectCode() {
123 return organizationReversion.getOrganizationChartCashObjectCode();
124 }
125 }