001/*
002 * The Kuali Financial System, a comprehensive financial management system for higher education.
003 * 
004 * Copyright 2005-2014 The Kuali Foundation
005 * 
006 * This program is free software: you can redistribute it and/or modify
007 * it under the terms of the GNU Affero General Public License as
008 * published by the Free Software Foundation, either version 3 of the
009 * License, or (at your option) any later version.
010 * 
011 * This program is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014 * GNU Affero General Public License for more details.
015 * 
016 * You should have received a copy of the GNU Affero General Public License
017 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
018 */
019package org.kuali.kfs.coa.businessobject;
020
021import org.kuali.kfs.sys.KFSConstants;
022import org.kuali.kfs.sys.context.SpringContext;
023import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
024import org.kuali.rice.kim.api.identity.Person;
025import org.kuali.rice.krad.bo.KualiCodeBase;
026
027/**
028 * 
029 */
030public class ProjectCode extends KualiCodeBase implements MutableInactivatable {
031
032    private static final long serialVersionUID = 4529316062843227897L;
033
034    public static final String CACHE_NAME = KFSConstants.APPLICATION_NAMESPACE_CODE + "/" + "ProjectCode";
035    
036    private String projectDescription;
037    private String projectManagerUniversalId;
038    private String chartOfAccountsCode;
039    private String organizationCode;
040
041    private Person projectManagerUniversal;
042    private Chart chartOfAccounts;
043    private Organization organization;
044
045    /**
046     * Default no-arg constructor.
047     */
048    public ProjectCode() {
049    }
050
051    /**
052     * Gets the projectDescription attribute.
053     * 
054     * @return Returns the projectDescription
055     */
056    public String getProjectDescription() {
057        return projectDescription;
058    }
059
060    /**
061     * Sets the projectDescription attribute.
062     * 
063     * @param projectDescription The projectDescription to set.
064     */
065    public void setProjectDescription(String projectDescription) {
066        this.projectDescription = projectDescription;
067    }
068
069    public Person getProjectManagerUniversal() {
070        projectManagerUniversal = SpringContext.getBean(org.kuali.rice.kim.api.identity.PersonService.class).updatePersonIfNecessary(projectManagerUniversalId, projectManagerUniversal);
071        return projectManagerUniversal;
072    }
073
074    /**
075     * Sets the projectManagerUniversal attribute.
076     * 
077     * @param projectManagerUniversal The projectManagerUniversal to set.
078     */
079    public void setProjectManagerUniversal(Person projectManagerUniversal) {
080        this.projectManagerUniversal = projectManagerUniversal;
081    }
082
083    /**
084     * Gets the chartOfAccounts attribute.
085     * 
086     * @return Returns the chartOfAccounts
087     */
088    public Chart getChartOfAccounts() {
089        return chartOfAccounts;
090    }
091
092    /**
093     * Sets the chartOfAccounts attribute.
094     * 
095     * @param chartOfAccounts The chartOfAccounts to set.
096     */
097    public void setChartOfAccounts(Chart chartOfAccounts) {
098        this.chartOfAccounts = chartOfAccounts;
099    }
100
101    /**
102     * Gets the organization attribute.
103     * 
104     * @return Returns the organization
105     */
106    public Organization getOrganization() {
107        return organization;
108    }
109
110    /**
111     * Sets the organization attribute.
112     * 
113     * @param organization The organization to set.
114     */
115    public void setOrganization(Organization organization) {
116        this.organization = organization;
117    }
118
119    /**
120     * @return Returns the chartOfAccountsCode.
121     */
122    public String getChartOfAccountsCode() {
123        return chartOfAccountsCode;
124    }
125
126    /**
127     * @param chartOfAccountsCode The chartOfAccountsCode to set.
128     */
129    public void setChartOfAccountsCode(String chartOfAccountsCode) {
130        this.chartOfAccountsCode = chartOfAccountsCode;
131    }
132
133    /**
134     * @return Returns the organizationCode.
135     */
136    public String getOrganizationCode() {
137        return organizationCode;
138    }
139
140    /**
141     * @param organizationCode The organizationCode to set.
142     */
143    public void setOrganizationCode(String organizationCode) {
144        this.organizationCode = organizationCode;
145    }
146
147    /**
148     * @return Returns the projectManagerUniversalId.
149     */
150    public String getProjectManagerUniversalId() {
151        return projectManagerUniversalId;
152    }
153
154    /**
155     * @param projectManagerUniversalId The projectManagerUniversalId to set.
156     */
157    public void setProjectManagerUniversalId(String projectManagerUniversalId) {
158        this.projectManagerUniversalId = projectManagerUniversalId;
159    }
160
161}
162