|
|
|
@ -2232,7 +2232,7 @@ public class WmsEnumUtil {
|
|
|
|
|
*/
|
|
|
|
|
public enum LANGUAGE_TYPE {
|
|
|
|
|
GROOVY(1, "Groovy", 10),
|
|
|
|
|
PYTHON(2, "Python", 20),
|
|
|
|
|
PYTHON(2, "jython", 20), // "jython" string can not change
|
|
|
|
|
JS(3, "JavaScript", 30);
|
|
|
|
|
// 下面这2种语言没人会写,暂不支持
|
|
|
|
|
//SCALA(40,"scala"),
|
|
|
|
@ -2242,7 +2242,7 @@ public class WmsEnumUtil {
|
|
|
|
|
private String description;
|
|
|
|
|
private int value;
|
|
|
|
|
|
|
|
|
|
private LANGUAGE_TYPE(int index, String description, int value) {
|
|
|
|
|
LANGUAGE_TYPE(int index, String description, int value) {
|
|
|
|
|
this.index = index;
|
|
|
|
|
this.description = description;
|
|
|
|
|
this.value = value;
|
|
|
|
@ -2261,9 +2261,9 @@ public class WmsEnumUtil {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 根据枚举编号获取语言代码
|
|
|
|
|
public static String getCodeByIndex(int index) {
|
|
|
|
|
public static String getCodeByIndex(Integer index) {
|
|
|
|
|
for (LANGUAGE_TYPE languageType : LANGUAGE_TYPE.values()) {
|
|
|
|
|
if (languageType.getIndex() == index) {
|
|
|
|
|
if (languageType.getValue() == index.intValue()) {
|
|
|
|
|
return languageType.getDescription();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|