View Javadoc

1   /**
2    * Copyright 2013 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   *
15   * Created by Mezba Mahtab (mezba.mahtab@utoronto.ca) on 1/18/13
16   */
17  package org.kuali.student.enrollment.examoffering.dto;
18  
19  import org.kuali.student.enrollment.examoffering.infc.ExamOffering;
20  import org.kuali.student.r2.common.dto.IdEntityInfo;
21  import org.w3c.dom.Element;
22  
23  import javax.xml.bind.annotation.XmlAccessType;
24  import javax.xml.bind.annotation.XmlAccessorType;
25  import javax.xml.bind.annotation.XmlAnyElement;
26  import javax.xml.bind.annotation.XmlElement;
27  import javax.xml.bind.annotation.XmlType;
28  import java.io.Serializable;
29  import java.util.List;
30  
31  /**
32   * This class represents information about an ExamOffering that can be scheduled.
33   *
34   * @author Mezba Mahtab (mezba.mahtab@utoronto.ca)
35   */
36  @XmlAccessorType(XmlAccessType.FIELD)
37  @XmlType(name = "ExamOfferingInfo", propOrder = {"id", "typeKey", "stateKey", "name",
38          "descr", "meta", "attributes",
39          "examPeriodId", "examId",
40          "scheduleId", "schedulingStateKey", "_futureElements"})
41  public class ExamOfferingInfo extends IdEntityInfo implements ExamOffering, Serializable {
42  
43      /////////////////////////////
44      // DATA VARIABLES
45      /////////////////////////////
46  
47      @XmlElement
48      private String examPeriodId;
49  
50      @XmlElement
51      private String examId; // the canonical exam id
52  
53      @XmlElement
54      private String scheduleId;
55  
56      @XmlElement
57      private String schedulingStateKey;
58  
59      @XmlAnyElement
60      private List<Element> _futureElements;
61  
62      //////////////////////////////
63      // CONSTRUCTORS
64      //////////////////////////////
65  
66      /**
67       * Constructs an empty ExamOffering.
68       */
69      public ExamOfferingInfo () { }
70  
71      /**
72       * Constructs a new ExamOfferingInfo from another
73       * ExamOffering.
74       *
75       * @param offering the exam offering to copy
76       */
77      public ExamOfferingInfo (ExamOffering offering) {
78          super(offering);
79  
80          if (offering == null) {
81              return;
82          }
83  
84          this.examPeriodId = offering.getExamPeriodId();
85          this.examId = offering.getExamId();
86          this.scheduleId= offering.getScheduleId();
87          this.schedulingStateKey= offering.getSchedulingStateKey();
88      }
89  
90  
91      //////////////////////////////
92      // GETTERS AND SETTERS
93      //////////////////////////////
94  
95  
96      public String getExamPeriodId() {
97          return examPeriodId;
98      }
99  
100     public void setExamPeriodId(String examPeriodId) {
101         this.examPeriodId = examPeriodId;
102     }
103 
104     public String getExamId() {
105         return examId;
106     }
107 
108     public void setExamId(String examId) {
109         this.examId = examId;
110     }
111 
112     public String getScheduleId() {
113         return scheduleId;
114     }
115 
116     public void setScheduleId(String scheduleId) {
117         this.scheduleId = scheduleId;
118     }
119 
120     public String getSchedulingStateKey() {
121         return schedulingStateKey;
122     }
123 
124     public void setSchedulingStateKey(String schedulingStateKey) {
125         this.schedulingStateKey = schedulingStateKey;
126     }
127 
128     public List<Element> get_futureElements() {
129         return _futureElements;
130     }
131 
132     public void set_futureElements(List<Element> _futureElements) {
133         this._futureElements = _futureElements;
134     }
135 }