1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.student.enrollment.courseregistration.dto; |
18 | |
|
19 | |
import java.io.Serializable; |
20 | |
import java.util.ArrayList; |
21 | |
import java.util.List; |
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 | |
|
29 | |
import org.kuali.student.enrollment.courseregistration.infc.RegistrationResponse; |
30 | |
import org.kuali.student.enrollment.courseregistration.infc.RegistrationResponseItem; |
31 | |
import org.kuali.student.r2.common.dto.OperationStatusInfo; |
32 | |
import org.w3c.dom.Element; |
33 | |
|
34 | 0 | @XmlAccessorType(XmlAccessType.FIELD) |
35 | |
@XmlType(name = "RegistrationResponseInfo", propOrder = { |
36 | |
"registrationRequestId", "operationStatus", |
37 | |
"registrationResponseItems", "_futureElements"}) |
38 | |
|
39 | |
public class RegistrationResponseInfo |
40 | |
implements RegistrationResponse, Serializable { |
41 | |
|
42 | |
private static final long serialVersionUID = 1L; |
43 | |
|
44 | |
@XmlElement |
45 | |
private String registrationRequestId; |
46 | |
|
47 | |
@XmlElement |
48 | |
private OperationStatusInfo operationStatus; |
49 | |
|
50 | |
@XmlElement |
51 | |
private List<RegistrationResponseItemInfo> registrationResponseItems; |
52 | |
|
53 | |
@XmlAnyElement |
54 | |
private List<Element> _futureElements; |
55 | |
|
56 | |
|
57 | |
|
58 | |
|
59 | 0 | public RegistrationResponseInfo() { |
60 | 0 | } |
61 | |
|
62 | |
|
63 | |
|
64 | |
|
65 | |
|
66 | |
|
67 | |
|
68 | 0 | public RegistrationResponseInfo(RegistrationResponse registrationResponse) { |
69 | |
|
70 | 0 | if (registrationResponse != null) { |
71 | 0 | this.registrationRequestId = registrationResponse.getRegistrationRequestId(); |
72 | 0 | if (registrationResponse.getOperationStatus() != null) { |
73 | 0 | this.operationStatus = new OperationStatusInfo(registrationResponse.getOperationStatus()); |
74 | |
} |
75 | |
|
76 | 0 | this.registrationResponseItems = new ArrayList<RegistrationResponseItemInfo>(); |
77 | |
|
78 | 0 | for (RegistrationResponseItem registrationResponseItem : registrationResponse.getRegistrationResponseItems()) { |
79 | 0 | this.registrationResponseItems.add(new RegistrationResponseItemInfo(registrationResponseItem)); |
80 | |
} |
81 | |
} |
82 | 0 | } |
83 | |
|
84 | |
@Override |
85 | |
public String getRegistrationRequestId() { |
86 | 0 | return registrationRequestId; |
87 | |
} |
88 | |
|
89 | |
public void setRegistrationRequestId(String registrationRequestId) { |
90 | 0 | this.registrationRequestId = registrationRequestId; |
91 | 0 | } |
92 | |
|
93 | |
@Override |
94 | |
public OperationStatusInfo getOperationStatus() { |
95 | 0 | return operationStatus; |
96 | |
} |
97 | |
|
98 | |
public void setOperationStatus(OperationStatusInfo operationStatus) { |
99 | 0 | this.operationStatus = operationStatus; |
100 | 0 | } |
101 | |
|
102 | |
@Override |
103 | |
public List<RegistrationResponseItemInfo> getRegistrationResponseItems() { |
104 | 0 | if (registrationResponseItems == null) { |
105 | 0 | registrationResponseItems = new ArrayList<RegistrationResponseItemInfo>(); |
106 | |
} |
107 | |
|
108 | 0 | return registrationResponseItems; |
109 | |
} |
110 | |
|
111 | |
public void setRegistrationResponseItems(List<RegistrationResponseItemInfo> registrationResponseItems) { |
112 | 0 | this.registrationResponseItems = registrationResponseItems; |
113 | 0 | } |
114 | |
} |