1 | |
package org.kuali.student.enrollment.registration.course.dto; |
2 | |
|
3 | |
import java.io.Serializable; |
4 | |
import java.util.ArrayList; |
5 | |
import java.util.List; |
6 | |
|
7 | |
import javax.xml.bind.annotation.XmlAccessType; |
8 | |
import javax.xml.bind.annotation.XmlAccessorType; |
9 | |
import javax.xml.bind.annotation.XmlAnyElement; |
10 | |
import javax.xml.bind.annotation.XmlElement; |
11 | |
import javax.xml.bind.annotation.XmlType; |
12 | |
|
13 | |
import org.kuali.student.enrollment.registration.course.infc.RegResponse; |
14 | |
import org.kuali.student.enrollment.registration.course.infc.RegResponseItem; |
15 | |
import org.kuali.student.r2.common.dto.OperationStatusInfo; |
16 | |
import org.w3c.dom.Element; |
17 | |
|
18 | 0 | @XmlAccessorType(XmlAccessType.FIELD) |
19 | |
@XmlType(name = "RegResponseInfo", propOrder = {"regRequestId", "regResponseItems", "operationStatus", "_futureElements"}) |
20 | |
public class RegResponseInfo implements RegResponse, Serializable { |
21 | |
|
22 | |
private static final long serialVersionUID = 1L; |
23 | |
@XmlElement |
24 | |
private String regRequestId; |
25 | |
@XmlElement |
26 | |
private List<RegResponseItemInfo> regResponseItems; |
27 | |
@XmlElement |
28 | |
private OperationStatusInfo operationStatus; |
29 | |
@XmlAnyElement |
30 | |
private List<Element> _futureElements; |
31 | |
|
32 | |
public RegResponseInfo() { |
33 | 0 | super(); |
34 | 0 | this.regRequestId = null; |
35 | 0 | this.regResponseItems = null; |
36 | 0 | this.operationStatus = null; |
37 | 0 | this._futureElements = null; |
38 | |
|
39 | 0 | } |
40 | |
|
41 | 0 | public RegResponseInfo(RegResponse regResponse) { |
42 | |
|
43 | 0 | if (null != regResponse) { |
44 | 0 | this.regRequestId = regResponse.getRegRequestId(); |
45 | 0 | this.regResponseItems = new ArrayList<RegResponseItemInfo>(); |
46 | |
|
47 | 0 | for (RegResponseItem regResponseItem : regResponse.getRegResponseItems()) { |
48 | 0 | this.regResponseItems.add(new RegResponseItemInfo(regResponseItem)); |
49 | |
} |
50 | 0 | if (regResponse.getOperationStatus() != null) { |
51 | 0 | this.operationStatus = new OperationStatusInfo(regResponse.getOperationStatus()); |
52 | |
} |
53 | 0 | this._futureElements = null; |
54 | |
} |
55 | 0 | } |
56 | |
|
57 | |
@Override |
58 | |
public List<RegResponseItemInfo> getRegResponseItems() { |
59 | 0 | return regResponseItems; |
60 | |
} |
61 | |
|
62 | |
public void setRegResponseItemInfos(List<RegResponseItemInfo> regResponseItemInfos) { |
63 | 0 | this.regResponseItems = regResponseItemInfos; |
64 | 0 | } |
65 | |
|
66 | |
@Override |
67 | |
public OperationStatusInfo getOperationStatus() { |
68 | 0 | return operationStatus; |
69 | |
} |
70 | |
|
71 | |
public void setOperationStatus(OperationStatusInfo operationStatus) { |
72 | 0 | this.operationStatus = operationStatus; |
73 | 0 | } |
74 | |
|
75 | |
@Override |
76 | |
public String getRegRequestId() { |
77 | 0 | return regRequestId; |
78 | |
} |
79 | |
|
80 | |
public void setRegRequestId(String regRequestId) { |
81 | 0 | this.regRequestId = regRequestId; |
82 | 0 | } |
83 | |
} |