blob: 30d0da4474047890551b608dd9c65e2f99630ed3 (
plain)
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 org.onap.sdc.dcae.composition.restmodels.ruleeditor;
import java.util.Arrays;
public enum ActionTypeEnum {
COPY("copy"),
MAP("map"),
CONCAT("concat"),
DATE_FORMATTER("dateFormatter"),
LOG_EVENT("logEvent"),
LOG_TEXT("logText"),
CLEAR("clear"),
REPLACE_TEXT("replaceText"),
CLEAR_NSF("clearNSF"),
HP_METRIC("hpMetric"),
STRING_TRANSFORM("stringTransform"),
TOPO_SEARCH("topologySearch");
private String type;
ActionTypeEnum(String type){
this.type = type;
}
public String getType(){
return type;
}
public static ActionTypeEnum getTypeByName(String action) {
return Arrays.stream(ActionTypeEnum.values()).filter(a -> action.replaceAll(" ", "").equalsIgnoreCase(a.type)).findAny().orElse(null);
}
}
|