575893bc5e35635cefcaab1add528de1e0f4d3df
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / mkjsf / errors / ConfigurationError.java
1 package com.indexdata.mkjsf.errors;\r
2 \r
3 import java.util.List;\r
4 \r
5 import com.indexdata.mkjsf.errors.ErrorHelper.ErrorCode;\r
6 import com.indexdata.mkjsf.pazpar2.data.Pazpar2Error;\r
7 \r
8 \r
9 public class ConfigurationError implements ErrorInterface {\r
10 \r
11   private static final long serialVersionUID = -6599667223782130838L;\r
12   private String label;\r
13   private String message;\r
14   private String exception;\r
15   private ErrorHelper helper;\r
16   private ErrorCode applicationErrorCode;\r
17   \r
18   public ConfigurationError(String label, String exception, String message) {\r
19     this.label = label;\r
20     this.message = message;    \r
21     this.exception = exception;\r
22   }\r
23   \r
24   public List<String> getSuggestions() {\r
25     return helper.getSuggestions(this);\r
26   }\r
27 \r
28   @Override\r
29   public String getLabel() {\r
30     return label;\r
31   }\r
32 \r
33   @Override\r
34   public String getMessage() {\r
35     return message;\r
36   }\r
37   \r
38   @Override\r
39   public String getException() {\r
40     return exception;\r
41   }\r
42   \r
43   @Override\r
44   public void setErrorHelper (ErrorHelper helper) {\r
45     this.helper = helper;\r
46   }\r
47 \r
48   @Override\r
49   public void setApplicationErrorCode(ErrorCode code) {\r
50     this.applicationErrorCode = code;\r
51   }\r
52 \r
53   @Override\r
54   public ErrorCode getApplicationErrorCode() {\r
55     return applicationErrorCode;\r
56   }\r
57   \r
58   public boolean hasPazpar2Error () {\r
59     return false;\r
60   }\r
61   \r
62   public Pazpar2Error getPazpar2Error() {\r
63     return null;\r
64   }\r
65  \r
66 }\r