1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.oxclient.communication.json;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import net.sf.oval.constraint.NotNull;
22 import net.sf.oval.guard.Guarded;
23 import net.sf.oxclient.GroupwareException;
24
25
26
27
28
29 @Guarded
30 public class JSONException extends GroupwareException {
31
32 private static final long serialVersionUID = -1390092059561550659L;
33
34 private String code;
35 private String errorId;
36 private int category;
37 private List<Integer> errorParams = new ArrayList<Integer>();
38
39 public JSONException() {
40 super();
41 }
42
43 public JSONException(final String arg0) {
44 super(arg0);
45 }
46
47 public JSONException(final String arg0, final Throwable arg1) {
48 super(arg0, arg1);
49 }
50
51 public JSONException(final Throwable arg0) {
52 super(arg0);
53 }
54
55 public String getCode() {
56 return this.code;
57 }
58
59 public void setCode(final String code) {
60 this.code = code;
61 }
62
63 public String getErrorId() {
64 return this.errorId;
65 }
66
67 public void setErrorId(final String errorId) {
68 this.errorId = errorId;
69 }
70
71 public int getCategory() {
72 return this.category;
73 }
74
75 public void setCategory(final int category) {
76 this.category = category;
77 }
78
79 public List<Integer> getErrorParams() {
80 return this.errorParams;
81 }
82
83 public void setErrorParams(@NotNull final List<Integer> errorParams) {
84 this.errorParams = errorParams;
85 }
86
87 public void addErrorParam(final int errorParam) {
88 this.errorParams.add(errorParam);
89 }
90
91 }