summaryrefslogtreecommitdiffstats
path: root/verigraph/src/it/polito/verigraph/model/ErrorMessage.java
diff options
context:
space:
mode:
Diffstat (limited to 'verigraph/src/it/polito/verigraph/model/ErrorMessage.java')
-rw-r--r--verigraph/src/it/polito/verigraph/model/ErrorMessage.java60
1 files changed, 60 insertions, 0 deletions
diff --git a/verigraph/src/it/polito/verigraph/model/ErrorMessage.java b/verigraph/src/it/polito/verigraph/model/ErrorMessage.java
new file mode 100644
index 0000000..e4aef4d
--- /dev/null
+++ b/verigraph/src/it/polito/verigraph/model/ErrorMessage.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Politecnico di Torino and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Apache License, Version 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *******************************************************************************/
+package it.polito.verigraph.model;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel(value = "Error")
+@XmlRootElement
+public class ErrorMessage {
+
+ @ApiModelProperty(example = "Error message")
+ private String errorMessage;
+ @ApiModelProperty(allowableValues = "400,403,404,500", value = "HTTP error code", example = "[400,403,404,500]")
+ private int errorCode;
+ @ApiModelProperty(example = "http://localhost:8080/verigraph/api-docs/")
+ private String documentation;
+
+ public ErrorMessage() {
+
+ }
+
+ public ErrorMessage(String errorMessage, int errorCode, String documentation) {
+ this.errorMessage = errorMessage;
+ this.errorCode = errorCode;
+ this.documentation = documentation;
+ }
+
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+ public void setErrorMessage(String errorMessage) {
+ this.errorMessage = errorMessage;
+ }
+
+ public int getErrorCode() {
+ return errorCode;
+ }
+
+ public void setErrorCode(int errorCode) {
+ this.errorCode = errorCode;
+ }
+
+ public String getDocumentation() {
+ return documentation;
+ }
+
+ public void setDocumentation(String documentation) {
+ this.documentation = documentation;
+ }
+
+} \ No newline at end of file