Merge branch 'master' of ssh://git.indexdata.com/home/git/private/mkjsf.git into...
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / mkjsf / errors / ConfigurationError.java
diff --git a/src/main/java/com/indexdata/mkjsf/errors/ConfigurationError.java b/src/main/java/com/indexdata/mkjsf/errors/ConfigurationError.java
new file mode 100644 (file)
index 0000000..b844549
--- /dev/null
@@ -0,0 +1,66 @@
+package com.indexdata.mkjsf.errors;\r
+\r
+import java.util.List;\r
+\r
+import com.indexdata.mkjsf.errors.ErrorHelper.ErrorCode;\r
+import com.indexdata.mkjsf.pazpar2.data.ServiceError;\r
+\r
+\r
+public class ConfigurationError implements ErrorInterface {\r
+\r
+  private static final long serialVersionUID = -6599667223782130838L;\r
+  private String label;\r
+  private String message;\r
+  private String exception;\r
+  private ErrorHelper helper;\r
+  private ErrorCode applicationErrorCode;\r
+  \r
+  public ConfigurationError(String label, String exception, String message) {\r
+    this.label = label;\r
+    this.message = message;    \r
+    this.exception = exception;\r
+  }\r
+  \r
+  public List<String> getSuggestions() {\r
+    return helper.getSuggestions(this);\r
+  }\r
+\r
+  @Override\r
+  public String getLabel() {\r
+    return label;\r
+  }\r
+\r
+  @Override\r
+  public String getMessage() {\r
+    return message;\r
+  }\r
+  \r
+  @Override\r
+  public String getException() {\r
+    return exception;\r
+  }\r
+  \r
+  @Override\r
+  public void setErrorHelper (ErrorHelper helper) {\r
+    this.helper = helper;\r
+  }\r
+\r
+  @Override\r
+  public void setApplicationErrorCode(ErrorCode code) {\r
+    this.applicationErrorCode = code;\r
+  }\r
+\r
+  @Override\r
+  public ErrorCode getApplicationErrorCode() {\r
+    return applicationErrorCode;\r
+  }\r
+  \r
+  public boolean isServiceError () {\r
+    return false;\r
+  }\r
+  \r
+  public ServiceError getServiceError() {\r
+    return null;\r
+  }\r
\r
+}\r