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 import org.kuali.kfs.sys.context.SpringContext; 019 import org.kuali.rice.kim.bo.Person; 020 import org.kuali.rice.kns.bo.Inactivateable; 021 import org.kuali.rice.kns.bo.KualiCodeBase; 022 023 /** 024 * 025 */ 026 public class ProjectCode extends KualiCodeBase implements Inactivateable { 027 028 private static final long serialVersionUID = 4529316062843227897L; 029 030 private String projectDescription; 031 private String projectManagerUniversalId; 032 private String chartOfAccountsCode; 033 private String organizationCode; 034 035 private Person projectManagerUniversal; 036 private Chart chartOfAccounts; 037 private Organization organization; 038 039 /** 040 * Default no-arg constructor. 041 */ 042 public ProjectCode() { 043 } 044 045 /** 046 * Gets the projectDescription attribute. 047 * 048 * @return Returns the projectDescription 049 */ 050 public String getProjectDescription() { 051 return projectDescription; 052 } 053 054 /** 055 * Sets the projectDescription attribute. 056 * 057 * @param projectDescription The projectDescription to set. 058 */ 059 public void setProjectDescription(String projectDescription) { 060 this.projectDescription = projectDescription; 061 } 062 063 public Person getProjectManagerUniversal() { 064 projectManagerUniversal = SpringContext.getBean(org.kuali.rice.kim.service.PersonService.class).updatePersonIfNecessary(projectManagerUniversalId, projectManagerUniversal); 065 return projectManagerUniversal; 066 } 067 068 /** 069 * Sets the projectManagerUniversal attribute. 070 * 071 * @param projectManagerUniversal The projectManagerUniversal to set. 072 */ 073 public void setProjectManagerUniversal(Person projectManagerUniversal) { 074 this.projectManagerUniversal = projectManagerUniversal; 075 } 076 077 /** 078 * Gets the chartOfAccounts attribute. 079 * 080 * @return Returns the chartOfAccounts 081 */ 082 public Chart getChartOfAccounts() { 083 return chartOfAccounts; 084 } 085 086 /** 087 * Sets the chartOfAccounts attribute. 088 * 089 * @param chartOfAccounts The chartOfAccounts to set. 090 */ 091 public void setChartOfAccounts(Chart chartOfAccounts) { 092 this.chartOfAccounts = chartOfAccounts; 093 } 094 095 /** 096 * Gets the organization attribute. 097 * 098 * @return Returns the organization 099 */ 100 public Organization getOrganization() { 101 return organization; 102 } 103 104 /** 105 * Sets the organization attribute. 106 * 107 * @param organization The organization to set. 108 */ 109 public void setOrganization(Organization organization) { 110 this.organization = organization; 111 } 112 113 /** 114 * @return Returns the chartOfAccountsCode. 115 */ 116 public String getChartOfAccountsCode() { 117 return chartOfAccountsCode; 118 } 119 120 /** 121 * @param chartOfAccountsCode The chartOfAccountsCode to set. 122 */ 123 public void setChartOfAccountsCode(String chartOfAccountsCode) { 124 this.chartOfAccountsCode = chartOfAccountsCode; 125 } 126 127 /** 128 * @return Returns the organizationCode. 129 */ 130 public String getOrganizationCode() { 131 return organizationCode; 132 } 133 134 /** 135 * @param organizationCode The organizationCode to set. 136 */ 137 public void setOrganizationCode(String organizationCode) { 138 this.organizationCode = organizationCode; 139 } 140 141 /** 142 * @return Returns the projectManagerUniversalId. 143 */ 144 public String getProjectManagerUniversalId() { 145 return projectManagerUniversalId; 146 } 147 148 /** 149 * @param projectManagerUniversalId The projectManagerUniversalId to set. 150 */ 151 public void setProjectManagerUniversalId(String projectManagerUniversalId) { 152 this.projectManagerUniversalId = projectManagerUniversalId; 153 } 154 155 } 156