blob: 4538da54d1a6966a3f259430bec61bf82d46c32e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package org.onap.sdc.dcae.composition.restmodels.ruleeditor;
import java.util.Arrays;
public enum ActionTypeEnum {
COPY("copy"), MAP("map"), CONCAT("concat"), DATE_FORMATTER("dateFormatter");
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);
}
}
|