From 9383db80fbf0de88608fe6bfbe5edf62471f4abb Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 14 Dec 2016 17:32:01 +0300 Subject: juick-core: api objects should live in core --- juick-core/src/main/java/com/juick/Status.java | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 juick-core/src/main/java/com/juick/Status.java (limited to 'juick-core/src/main/java/com/juick/Status.java') diff --git a/juick-core/src/main/java/com/juick/Status.java b/juick-core/src/main/java/com/juick/Status.java new file mode 100644 index 00000000..794f1c9e --- /dev/null +++ b/juick-core/src/main/java/com/juick/Status.java @@ -0,0 +1,32 @@ +package com.juick; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Created by vitalyster on 25.07.2016. + */ +public class Status { + private final 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; + } + + @JsonProperty("status") + public String getValue() { + return value; + } + + @Override + public String toString() { + return "value = " + value; + } +} -- cgit v1.2.3