7d3f7ba0bbf23d733e17408899d8184b6c226106
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / pz2utils4jsf / errors / ConfigurationError.java
1 package com.indexdata.pz2utils4jsf.errors;\r
2 \r
3 import java.util.List;\r
4 \r
5 import com.indexdata.pz2utils4jsf.errors.ErrorHelper.ErrorCode;\r
6 import com.indexdata.pz2utils4jsf.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, ErrorHelper helper) {\r
19     this.label = label;\r
20     this.message = message;\r
21     this.helper = helper;  \r
22     this.exception = exception;\r
23   }\r
24   \r
25   public List<String> getSuggestions() {\r
26     return helper.getSuggestions(this);\r
27   }\r
28 \r
29   @Override\r
30   public String getLabel() {\r
31     return label;\r
32   }\r
33 \r
34   @Override\r
35   public String getMessage() {\r
36     return message;\r
37   }\r
38   \r
39   @Override\r
40   public String getException() {\r
41     return exception;\r
42   }\r
43   \r
44   @Override\r
45   public void setErrorHelper (ErrorHelper helper) {\r
46     this.helper = helper;\r
47   }\r
48 \r
49   @Override\r
50   public void setApplicationErrorCode(ErrorCode code) {\r
51     this.applicationErrorCode = code;\r
52   }\r
53 \r
54   @Override\r
55   public ErrorCode getApplicationErrorCode() {\r
56     return applicationErrorCode;\r
57   }\r
58   \r
59   public boolean hasPazpar2Error () {\r
60     return false;\r
61   }\r
62   \r
63   public Pazpar2Error getPazpar2Error() {\r
64     return null;\r
65   }\r
66  \r
67 }\r