diff options
Diffstat (limited to 'juick-server/src/main')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/helpers/Status.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/helpers/Status.java b/juick-server/src/main/java/com/juick/server/helpers/Status.java index f68baae5..3c344193 100644 --- a/juick-server/src/main/java/com/juick/server/helpers/Status.java +++ b/juick-server/src/main/java/com/juick/server/helpers/Status.java @@ -6,9 +6,17 @@ import com.fasterxml.jackson.annotation.JsonProperty; * Created by vitalyster on 25.07.2016. */ public class Status { - private String value; + private final String value; - public Status(String value) { + public static final Status OK = new Status("ok"); + public static final Status FAIL = new Status("Fail"); + public static final Status ERROR = new Status("Error"); + + public static Status getStatus(final String stringStatus) { + return new Status(stringStatus); + } + + private Status(String value) { this.value = value; } @@ -16,4 +24,9 @@ public class Status { public String getValue() { return value; } + + @Override + public String toString() { + return "value = " + value; + } } |