aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/helpers/Status.java
blob: 3c344193a88040b775c9c3f77feeb5f6688c2096 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.juick.server.helpers;

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;
    }
}