1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
package info.magnolia.rest; |
35 |
|
|
36 |
|
import javax.xml.bind.annotation.XmlElement; |
37 |
|
import javax.xml.bind.annotation.XmlRootElement; |
38 |
|
|
39 |
|
import com.fasterxml.jackson.annotation.JsonProperty; |
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
@XmlRootElement |
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
46 |
|
public class RestError { |
47 |
|
|
48 |
|
@XmlElement(name = "error") |
49 |
|
@JsonProperty("error") |
50 |
|
private final ErrorContainer errorContainer; |
51 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
52 |
2 |
public RestError() {... |
53 |
2 |
errorContainer = new ErrorContainer("", ""); |
54 |
|
} |
55 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
56 |
14 |
public RestError(String code, String message) {... |
57 |
14 |
errorContainer = new ErrorContainer(code, message); |
58 |
|
} |
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
63 |
|
public static class ErrorContainer { |
64 |
|
|
65 |
|
@XmlElement(name = "code") |
66 |
|
private final String code; |
67 |
|
|
68 |
|
@XmlElement(name = "message") |
69 |
|
private final String message; |
70 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
71 |
2 |
public ErrorContainer() {... |
72 |
2 |
this.code = ""; |
73 |
2 |
this.message = ""; |
74 |
|
} |
75 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
76 |
16 |
public ErrorContainer(String code, String message) {... |
77 |
16 |
this.code = code; |
78 |
16 |
this.message = message; |
79 |
|
} |
80 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
81 |
|
public String getCode() {... |
82 |
|
return code; |
83 |
|
} |
84 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
85 |
|
public String getMessage() {... |
86 |
|
return message; |
87 |
|
} |
88 |
|
} |
89 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
90 |
|
public ErrorContainer getErrorContainer() {... |
91 |
|
return errorContainer; |
92 |
|
} |
93 |
|
} |