1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.r2.core.scheduling.dto; |
17 | |
|
18 | |
import org.kuali.student.r2.core.scheduling.infc.ScheduleComponent; |
19 | |
import org.w3c.dom.Element; |
20 | |
|
21 | |
import javax.xml.bind.annotation.XmlAccessType; |
22 | |
import javax.xml.bind.annotation.XmlAccessorType; |
23 | |
import javax.xml.bind.annotation.XmlAnyElement; |
24 | |
import javax.xml.bind.annotation.XmlElement; |
25 | |
import javax.xml.bind.annotation.XmlType; |
26 | |
import java.io.Serializable; |
27 | |
import java.util.ArrayList; |
28 | |
import java.util.List; |
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
@XmlAccessorType(XmlAccessType.FIELD) |
35 | |
@XmlType(name = "ScheduleComponentInfo", propOrder = {"id", "roomId", "timeSlotIds", "_futureElements"}) |
36 | |
public class ScheduleComponentInfo implements ScheduleComponent, Serializable { |
37 | |
|
38 | |
@XmlElement |
39 | |
private String id; |
40 | |
@XmlElement |
41 | |
private String roomId; |
42 | |
@XmlElement |
43 | |
private List<String> timeSlotIds; |
44 | |
@XmlAnyElement |
45 | |
private List<Element> _futureElements; |
46 | |
|
47 | 0 | public ScheduleComponentInfo() { |
48 | 0 | } |
49 | |
|
50 | 0 | public ScheduleComponentInfo(ScheduleComponent scheduleComponent) { |
51 | 0 | if (null != scheduleComponent) { |
52 | 0 | this.id = scheduleComponent.getId(); |
53 | 0 | this.roomId = scheduleComponent.getRoomId(); |
54 | 0 | this.timeSlotIds = new ArrayList<String>(scheduleComponent.getTimeSlotIds()); |
55 | |
} |
56 | 0 | } |
57 | |
|
58 | |
@Override |
59 | |
public String getId() { |
60 | 0 | return this.id; |
61 | |
} |
62 | |
|
63 | |
public void setId(String id) { |
64 | 0 | this.id = id; |
65 | 0 | } |
66 | |
|
67 | |
@Override |
68 | |
public String getRoomId() { |
69 | 0 | return roomId; |
70 | |
} |
71 | |
|
72 | |
public void setRoomId(String roomId) { |
73 | 0 | this.roomId = roomId; |
74 | 0 | } |
75 | |
|
76 | |
@Override |
77 | |
public List<String> getTimeSlotIds() { |
78 | 0 | if (null == timeSlotIds) { |
79 | 0 | return new ArrayList<String>(); |
80 | |
} |
81 | |
else { |
82 | 0 | return timeSlotIds; |
83 | |
} |
84 | |
} |
85 | |
|
86 | |
public void setTimeSlotIds(List<String> timeSlotIds) { |
87 | 0 | this.timeSlotIds = timeSlotIds; |
88 | 0 | } |
89 | |
} |