1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.r2.core.appointment.dto; |
17 | |
|
18 | |
import org.kuali.student.r2.common.dto.TimeAmountInfo; |
19 | |
import org.kuali.student.r2.common.dto.TimeOfDayInfo; |
20 | |
import org.kuali.student.r2.core.appointment.infc.AppointmentSlotRule; |
21 | |
|
22 | |
import javax.xml.bind.Element; |
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.util.ArrayList; |
29 | |
import java.util.List; |
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | 0 | @XmlAccessorType(XmlAccessType.FIELD) |
36 | |
@XmlType(name = "AppointmentSlotRuleInfo", propOrder = {"weekdays", "startTimeOfDay", "endTimeOfDay", |
37 | |
"slotStartInterval", "slotDuration", "_futureElements"}) |
38 | |
public class AppointmentSlotRuleInfo implements AppointmentSlotRule { |
39 | |
|
40 | |
@XmlElement |
41 | |
private List<Integer> weekdays; |
42 | |
@XmlElement |
43 | |
private TimeOfDayInfo startTimeOfDay; |
44 | |
@XmlElement |
45 | |
private TimeOfDayInfo endTimeOfDay; |
46 | |
@XmlElement |
47 | |
private TimeAmountInfo slotStartInterval; |
48 | |
@XmlElement |
49 | |
private TimeAmountInfo slotDuration; |
50 | |
@XmlAnyElement |
51 | |
private List<Element> _futureElements; |
52 | |
|
53 | 0 | public AppointmentSlotRuleInfo() { |
54 | |
|
55 | 0 | } |
56 | |
|
57 | 0 | public AppointmentSlotRuleInfo(AppointmentSlotRule appointmentSlotRule) { |
58 | 0 | if (null != appointmentSlotRule) { |
59 | 0 | this.weekdays = new ArrayList<Integer>(appointmentSlotRule.getWeekdays()); |
60 | 0 | this.startTimeOfDay = (null != appointmentSlotRule.getStartTimeOfDay()) ? new TimeOfDayInfo(appointmentSlotRule.getStartTimeOfDay()) : null; |
61 | 0 | this.endTimeOfDay = (null != appointmentSlotRule.getEndTimeOfDay()) ? new TimeOfDayInfo(appointmentSlotRule.getEndTimeOfDay()) : null; |
62 | 0 | this.slotStartInterval = (null != appointmentSlotRule.getSlotStartInterval()) ? new TimeAmountInfo(appointmentSlotRule.getSlotStartInterval()) : null; |
63 | 0 | this.slotDuration = (null != appointmentSlotRule.getSlotDuration()) ? new TimeAmountInfo(appointmentSlotRule.getSlotDuration()) : null; |
64 | |
} |
65 | 0 | } |
66 | |
|
67 | |
public void setWeekdays(List<Integer> weekdays) { |
68 | 0 | this.weekdays = weekdays; |
69 | 0 | } |
70 | |
|
71 | |
@Override |
72 | |
public List<Integer> getWeekdays() { |
73 | 0 | if (null == this.weekdays) { |
74 | 0 | this.weekdays = new ArrayList<Integer>(); |
75 | |
} |
76 | 0 | return this.weekdays; |
77 | |
} |
78 | |
|
79 | |
public void setStartTimeOfDay(TimeOfDayInfo startTimeOfDay) { |
80 | 0 | this.startTimeOfDay = startTimeOfDay; |
81 | 0 | } |
82 | |
|
83 | |
@Override |
84 | |
public TimeOfDayInfo getStartTimeOfDay() { |
85 | 0 | return this.startTimeOfDay; |
86 | |
} |
87 | |
|
88 | |
public void setEndTimeOfDay(TimeOfDayInfo endTimeOfDay) { |
89 | 0 | this.endTimeOfDay = endTimeOfDay; |
90 | 0 | } |
91 | |
|
92 | |
@Override |
93 | |
public TimeOfDayInfo getEndTimeOfDay() { |
94 | 0 | return this.endTimeOfDay; |
95 | |
} |
96 | |
|
97 | |
public void setSlotStartInterval(TimeAmountInfo slotStartInterval) { |
98 | 0 | this.slotStartInterval = slotStartInterval; |
99 | 0 | } |
100 | |
|
101 | |
@Override |
102 | |
public TimeAmountInfo getSlotStartInterval() { |
103 | 0 | return this.slotStartInterval; |
104 | |
} |
105 | |
|
106 | |
public void setSlotDuration(TimeAmountInfo slotDuration) { |
107 | 0 | this.slotDuration = slotDuration; |
108 | 0 | } |
109 | |
|
110 | |
@Override |
111 | |
public TimeAmountInfo getSlotDuration() { |
112 | 0 | return this.slotDuration; |
113 | |
} |
114 | |
} |