Add RFC 8040 compliant error handler
[ccsdk/apps.git] / services / src / main / java / org / onap / ccsdk / apps / services / RestError.java
1 package org.onap.ccsdk.apps.services;
2
3 import com.fasterxml.jackson.annotation.JsonProperty;
4 import com.fasterxml.jackson.annotation.JsonRootName;
5
6 @JsonRootName(value="error")
7 public abstract class RestError {
8
9     protected String errorType;
10     protected String errorTag;
11     protected String errorPath;
12     protected String errorMessage;
13     protected String errorInfo;
14
15
16     @JsonProperty("error-type")
17     public String getErrorType() {
18         return errorType;
19     }
20
21     @JsonProperty("error-tag")
22     public String getErrorTag() {
23         return errorTag;
24     }
25
26     public void setErrorTag(String errorTag) {
27         this.errorTag = errorTag;
28     }
29
30     @JsonProperty("error-path")
31     public String getErrorPath() {
32         return errorPath;
33     }
34
35     public void setErrorPath(String errorPath) {
36         this.errorPath = errorPath;
37     }
38
39     @JsonProperty("error-message")
40     public String getErrorMessage() {
41         return errorMessage;
42     }
43
44     public void setErrorMessage(String errorMessage) {
45         this.errorMessage = errorMessage;
46     }
47
48     @JsonProperty("error-info")
49     public String getErrorInfo() {
50         return errorInfo;
51     }
52
53     public void setErrorInfo(String errorInfo) {
54         this.errorInfo = errorInfo;
55     }
56
57 }