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    CANCELLED("CANCELLED");
25  
26    private String value;
27  
28    DocumentStatus(String value) {
29      this.value = value;
30    }
31  
32    @Override
33    @JsonValue
34    public String toString() {
35      return String.valueOf(value);
36    }
37  
38    @JsonCreator
39    public static DocumentStatus fromValue(String text) {
40      for (DocumentStatus b : DocumentStatus.values()) {
41        if (String.valueOf(b.value).equals(text)) {
42          return b;
43        }
44      }
45      throw new IllegalArgumentException("Unexpected value '" + text + "'");
46    }
47  }