1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.student.r2.common.dto;
18
19 import org.kuali.student.r2.common.infc.Status;
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.List;
28
29
30
31
32
33
34
35
36 @XmlAccessorType(XmlAccessType.FIELD)
37 @XmlType(name = "StatusInfo", propOrder = {"isSuccess", "message" , "_futureElements" })
38
39 public class StatusInfo
40 implements Status, Serializable {
41
42 private static final long serialVersionUID = 1L;
43
44 @XmlElement
45 private Boolean isSuccess;
46
47 @XmlElement
48 private String message;
49
50 @XmlAnyElement
51 private List<Object> _futureElements;
52
53
54
55
56
57 public StatusInfo() {
58 isSuccess = Boolean.valueOf(true);
59 message = "";
60 }
61
62
63
64
65
66
67 public StatusInfo(Status status) {
68 this.isSuccess = status.getIsSuccess();
69 this.message = status.getMessage();
70 }
71
72 @Override
73 public Boolean getIsSuccess(){
74 return isSuccess;
75 }
76
77 public void setSuccess(Boolean success) {
78 this.isSuccess = success;
79 }
80
81 @Override
82 public String getMessage() {
83 return message;
84 }
85
86 public void setMessage(String message) {
87 this.message = message;
88 }
89
90 @Override
91 public String toString() {
92 return "StatusInfo{" +
93 "isSuccess=" + isSuccess +
94 ", message='" + message + '\'' +
95 '}';
96 }
97 }