View Javadoc

1   /*
2    * Copyright 2009 The Kuali Foundation Licensed under the Educational Community
3    * License, Version 1.0 (the "License"); you may not use this file except in
4    * compliance with the License. You may obtain a copy of the License at
5    * http://www.opensource.org/licenses/ecl1.php Unless required by applicable law
6    * or agreed to in writing, software distributed under the License is
7    * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8    * KIND, either express or implied. See the License for the specific language
9    * governing permissions and limitations under the License.
10   */
11  package org.kuali.student.r2.lum.program.dto;
12  
13  import java.io.Serializable;
14  import java.util.ArrayList;
15  import java.util.List;
16  
17  import javax.xml.bind.annotation.XmlAccessType;
18  import javax.xml.bind.annotation.XmlAccessorType;
19  import javax.xml.bind.annotation.XmlAnyElement;
20  import javax.xml.bind.annotation.XmlElement;
21  import javax.xml.bind.annotation.XmlType;
22  
23  import org.kuali.student.r2.lum.clu.dto.AdminOrgInfo;
24  import org.kuali.student.r2.lum.program.dto.assembly.ProgramAtpAssembly;
25  import org.kuali.student.r2.lum.program.dto.assembly.ProgramBasicOrgAssembly;
26  import org.kuali.student.r2.lum.program.dto.assembly.ProgramCodeAssembly;
27  import org.kuali.student.r2.lum.program.dto.assembly.ProgramIdentifierAssembly;
28  import org.kuali.student.r2.lum.program.dto.assembly.ProgramRequirementAssembly;
29  import org.kuali.student.r2.lum.program.infc.CredentialProgram;
30  
31  /**
32   * Detailed information about a single credential program, e.g. Baccalaureate,
33   * Master, Doctoral, Graduate Certificate, Undergraduate Certificate
34   * 
35   * @author Kuali Student Team (sambitpa@kuali.org)
36   */
37  @XmlType(name = "CredentialProgramInfo", propOrder = {"id",
38      "typeKey",
39      "stateKey",
40      "version",
41      "descr",
42      "code",
43      "shortTitle",
44      "longTitle",
45      "transcriptTitle",
46      "universityClassification",
47      "startTerm",
48      "endTerm",
49      "endProgramEntryTerm",
50      "divisionsContentOwner",
51      "divisionsStudentOversight",
52      "unitsContentOwner",
53      "unitsStudentOversight",
54      "learningObjectives",
55      "programRequirements",
56      "institution",
57      "resultOptions",
58      "programLevel",
59      "coreProgramIds",
60      "meta",
61      "attributes" , "_futureElements" }) 
62      
63  @XmlAccessorType(XmlAccessType.FIELD)
64  public class CredentialProgramInfo extends CommonWithCredentialProgramInfo implements CredentialProgram,
65          ProgramCodeAssembly,
66          ProgramIdentifierAssembly,
67          ProgramAtpAssembly,
68          ProgramBasicOrgAssembly,
69          ProgramRequirementAssembly,
70          Serializable {
71      
72      private static final long serialVersionUID = 1L;
73      @XmlElement
74      private AdminOrgInfo institution;
75      @XmlElement
76      private List<String> resultOptions;
77      @XmlElement
78      private String programLevel;
79      @XmlElement
80      private List<String> coreProgramIds;
81      @XmlAnyElement
82      private List<Object> _futureElements;  
83       
84      public CredentialProgramInfo() {
85      }
86      
87      public CredentialProgramInfo(CredentialProgram credentialProgram) {
88          super(credentialProgram);
89          if (credentialProgram != null) {
90              this.institution = new AdminOrgInfo(credentialProgram.getInstitution());
91              this.resultOptions = credentialProgram.getResultOptions() != null
92                      ? new ArrayList<String>(credentialProgram.getResultOptions())
93                      : new ArrayList<String>();
94              this.programLevel = credentialProgram.getProgramLevel();
95              this.coreProgramIds = credentialProgram.getCoreProgramIds() != null
96                      ? new ArrayList<String>(credentialProgram.getCoreProgramIds())
97                      : new ArrayList<String>();
98          }
99      }
100     
101     @Override
102     public List<String> getCoreProgramIds() {
103         return coreProgramIds;
104     }
105     
106     public void setCoreProgramIds(List<String> coreProgramIds) {
107         this.coreProgramIds = coreProgramIds;
108     }
109 
110     /**
111      * R1 Compatibility
112      * @deprecated
113      */
114     @Deprecated
115     public String getCredentialProgramType() {
116         return this.getTypeKey();
117     }
118 
119     /**
120      * R1 Compatibility
121      * @deprecated
122      */
123     @Deprecated
124     public void setCredentialProgramType(String credentialProgramType) {
125         this.setTypeKey(credentialProgramType);
126     }
127     
128     @Override
129     public String getProgramLevel() {
130         return programLevel;
131     }
132     
133     public void setProgramLevel(String programLevel) {
134         this.programLevel = programLevel;
135     }
136     
137     @Override
138     public AdminOrgInfo getInstitution() {
139         return institution;
140     }
141     
142     public void setInstitution(AdminOrgInfo institution) {
143         this.institution = institution;
144     }
145     
146     @Override
147     public List<String> getResultOptions() {
148         return resultOptions;
149     }
150 
151     public void setResultOptions(List<String> resultOptions) {
152         this.resultOptions = resultOptions;
153     }
154 
155     //KSCM-313 Should be removed, see https://wiki.kuali.org/display/STUDENT/R1+to+R2+Change+Log 
156     @Override
157     public String getDiplomaTitle() {
158         return null;
159     }
160 
161     //KSCM-313 Should be removed, see https://wiki.kuali.org/display/STUDENT/R1+to+R2+Change+Log
162     @Override
163     public void setDiplomaTitle(String diplomaTitle) {
164         
165     }
166 
167     @Override
168     public String getCip2000Code() {
169         // TODO Auto-generated method stub
170         return null;
171     }
172 
173     @Override
174     public void setCip2000Code(String cip2000Code) {
175         // TODO Auto-generated method stub
176         
177     }
178 
179     @Override
180     public String getCip2010Code() {
181         // TODO Auto-generated method stub
182         return null;
183     }
184 
185     @Override
186     public void setCip2010Code(String cip2010Code) {
187         // TODO Auto-generated method stub
188         
189     }
190 
191     @Override
192     public String getHegisCode() {
193         // TODO Auto-generated method stub
194         return null;
195     }
196 
197     @Override
198     public void setHegisCode(String hegisCode) {
199         // TODO Auto-generated method stub
200         
201     }
202 
203     @Override
204     public String getSelectiveEnrollmentCode() {
205         // TODO Auto-generated method stub
206         return null;
207     }
208 
209     @Override
210     public void setSelectiveEnrollmentCode(String selectiveEnrollmentCode) {
211         // TODO Auto-generated method stub
212         
213     }
214     
215 }