View Javadoc
1   package com.acumenvelocity.ath.model;
2   
3   /**
4    * Current processing status of the document
5    **/
6   import com.fasterxml.jackson.annotation.JsonCreator;
7   import com.fasterxml.jackson.annotation.JsonValue;
8   
9   /**
10   * Current processing status of the document
11   */
12  public enum DocumentStatus {
13  
14    IMPORTING("IMPORTING"),
15  
16    IMPORT_COMPLETED("IMPORT_COMPLETED"),
17  
18    EXPORTING("EXPORTING"),
19  
20    EXPORT_COMPLETED("EXPORT_COMPLETED"),
21  
22    FAILED("FAILED");
23  
24    private String value;
25  
26    DocumentStatus(String value) {
27      this.value = value;
28    }
29  
30    @Override
31    @JsonValue
32    public String toString() {
33      return String.valueOf(value);
34    }
35  
36    @JsonCreator
37    public static DocumentStatus fromValue(String text) {
38      for (DocumentStatus b : DocumentStatus.values()) {
39        if (String.valueOf(b.value).equals(text)) {
40          return b;
41        }
42      }
43      throw new IllegalArgumentException("Unexpected value '" + text + "'");
44    }
45  }