1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.contract.model.test.source; |
17 |
|
|
18 |
|
import java.io.Serializable; |
19 |
|
import java.util.List; |
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 |
|
|
27 |
|
import org.kuali.student.contract.model.test.source.ModelBuilder; |
28 |
|
import org.kuali.student.contract.model.test.source.Status; |
29 |
|
import org.w3c.dom.Element; |
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
@author |
35 |
|
|
36 |
|
@XmlAccessorType(XmlAccessType.FIELD) |
37 |
|
@XmlType(name = "StatusInfo", propOrder = {"success", "message", "_futureElements"}) |
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 4 |
Complexity Density: 0.5 |
|
38 |
|
public class StatusInfo implements Status, Serializable { |
39 |
|
private static final long serialVersionUID = 1L; |
40 |
|
|
41 |
|
@XmlElement |
42 |
|
private final Boolean success; |
43 |
|
|
44 |
|
@XmlElement |
45 |
|
private final String message; |
46 |
|
|
47 |
|
@XmlAnyElement |
48 |
|
private final List<Element> _futureElements; |
49 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
50 |
0
|
private StatusInfo() {... |
51 |
0
|
success = true; |
52 |
0
|
message = ""; |
53 |
0
|
_futureElements = null; |
54 |
|
} |
55 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
56 |
0
|
private StatusInfo(Status builder) {... |
57 |
0
|
this.success = new Boolean(builder.isSuccess().booleanValue()); |
58 |
0
|
this.message = builder.getMessage(); |
59 |
0
|
this._futureElements = null; |
60 |
|
} |
61 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
62 |
0
|
@Override... |
63 |
|
public Boolean isSuccess(){ |
64 |
0
|
return success; |
65 |
|
} |
66 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
67 |
0
|
@Override... |
68 |
|
public String getMessage() { |
69 |
0
|
return message; |
70 |
|
} |
71 |
|
|
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 8 |
Complexity Density: 1 |
|
72 |
|
public static class Builder implements ModelBuilder<StatusInfo>, Status { |
73 |
|
private Boolean success; |
74 |
|
private String message; |
75 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
76 |
0
|
public Builder() {}... |
77 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
78 |
0
|
public Builder(Status status) {... |
79 |
0
|
this.success = status.isSuccess(); |
80 |
0
|
this.message = status.getMessage(); |
81 |
|
} |
82 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
83 |
0
|
public StatusInfo build() {... |
84 |
0
|
return new StatusInfo(this); |
85 |
|
} |
86 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
87 |
0
|
@Override... |
88 |
|
public Boolean isSuccess() { |
89 |
0
|
return success; |
90 |
|
} |
91 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
92 |
0
|
@Override... |
93 |
|
public String getMessage() { |
94 |
0
|
return message; |
95 |
|
} |
96 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
97 |
0
|
public Boolean getSuccess() {... |
98 |
0
|
return success; |
99 |
|
} |
100 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
101 |
0
|
public void setSuccess(Boolean success) {... |
102 |
0
|
this.success = success; |
103 |
|
} |
104 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
105 |
0
|
public void setMessage(String message) {... |
106 |
0
|
this.message = message; |
107 |
|
} |
108 |
|
} |
109 |
|
} |