NotificationState.java
956 Bytes
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
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.cq.mobile.notifications.impl;
import java.util.Locale;
public enum NotificationState {
ERROR("error"),
DRAFT("draft"),
READY("ready"),
SCHEDULED("scheduled"),
SENT("sent");
private String state;
private NotificationState() {
}
private NotificationState(String state) {
this.state = state;
}
public String asString() {
return this.state;
}
public String toString() {
return this.asString();
}
public static boolean isA(String value) {
try {
return NotificationState.getFromString(value) != null;
}
catch (IllegalArgumentException ex) {
return false;
}
}
public static NotificationState getFromString(String value) throws IllegalArgumentException {
return NotificationState.valueOf(value.trim().toUpperCase(Locale.ENGLISH));
}
}