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.common.dto.IdEntityInfo; |
19 | |
import org.kuali.student.r2.core.scheduling.infc.ScheduleRequest; |
20 | |
import org.kuali.student.r2.core.scheduling.infc.ScheduleRequestComponent; |
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.ArrayList; |
30 | |
import java.util.List; |
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
@XmlAccessorType(XmlAccessType.FIELD) |
37 | |
@XmlType(name = "ScheduleRequestInfo", propOrder = {"id", "typeKey", "stateKey", "name", "descr", |
38 | |
"refObjectId", "refObjectTypeKey", "scheduleRequestComponents", |
39 | |
"meta", "attributes", "_futureElements"}) |
40 | |
public class ScheduleRequestInfo extends IdEntityInfo implements ScheduleRequest, Serializable { |
41 | |
|
42 | |
@XmlElement |
43 | |
private String refObjectId; |
44 | |
@XmlElement |
45 | |
private String refObjectTypeKey; |
46 | |
@XmlElement |
47 | |
private List<ScheduleRequestComponentInfo> scheduleRequestComponents; |
48 | |
@XmlAnyElement |
49 | |
private List<Element> _futureElements; |
50 | |
|
51 | 0 | public ScheduleRequestInfo() { |
52 | 0 | } |
53 | |
|
54 | |
public ScheduleRequestInfo(ScheduleRequest scheduleRequest) { |
55 | 0 | super (scheduleRequest); |
56 | 0 | if (null != scheduleRequest) { |
57 | 0 | this.refObjectId = scheduleRequest.getRefObjectId(); |
58 | 0 | this.refObjectTypeKey = scheduleRequest.getRefObjectTypeKey(); |
59 | 0 | this.scheduleRequestComponents = new ArrayList<ScheduleRequestComponentInfo>(); |
60 | 0 | for(ScheduleRequestComponent component : scheduleRequest.getScheduleRequestComponents()) { |
61 | 0 | this.scheduleRequestComponents.add(new ScheduleRequestComponentInfo(component)); |
62 | |
} |
63 | |
} |
64 | 0 | } |
65 | |
|
66 | |
@Override |
67 | |
public String getRefObjectTypeKey() { |
68 | 0 | return this.refObjectTypeKey; |
69 | |
} |
70 | |
|
71 | |
public void setRefObjectTypeKey(String refObjectTypeKey) { |
72 | 0 | this.refObjectTypeKey = refObjectTypeKey; |
73 | 0 | } |
74 | |
|
75 | |
@Override |
76 | |
public String getRefObjectId() { |
77 | 0 | return this.refObjectId; |
78 | |
} |
79 | |
|
80 | |
public void setRefObjectId(String refObjectId) { |
81 | 0 | this.refObjectId = refObjectId; |
82 | 0 | } |
83 | |
|
84 | |
@Override |
85 | |
public List<ScheduleRequestComponentInfo> getScheduleRequestComponents() { |
86 | 0 | if (null == this.scheduleRequestComponents) { |
87 | 0 | return new ArrayList<ScheduleRequestComponentInfo>(); |
88 | |
} |
89 | |
else { |
90 | 0 | return this.scheduleRequestComponents; |
91 | |
} |
92 | |
} |
93 | |
|
94 | |
public void setScheduleRequestComponents(List<ScheduleRequestComponentInfo> scheduleRequestComponents) { |
95 | 0 | this.scheduleRequestComponents = scheduleRequestComponents; |
96 | 0 | } |
97 | |
} |