public static final String INTEGER_TYPE = "integer";
public static final String BOOLEAN_TYPE = "boolean";
+ public static final String STRING_TYPE = "string";
public static LinkedHashMap<String, Object> createInputValue(String type, String description, Object defaultValue) {
LinkedHashMap<String, Object> inputMap = new LinkedHashMap<>();
return inputMap;
}
+ public static LinkedHashMap<String, Object> createInputValue(String type, Object defaultValue) {
+ LinkedHashMap<String, Object> inputMap = new LinkedHashMap<>();
+ inputMap.put("type", type);
+ inputMap.put("default", defaultValue);
+ return inputMap;
+ }
+
public static LinkedHashMap<String, Object> createIntegerInput(String description, Object defaultValue){
return createInputValue(INTEGER_TYPE, description, defaultValue);
}
return createInputValue(BOOLEAN_TYPE, description, defaultValue);
}
+ public static LinkedHashMap<String, Object> createStringInput(String description, Object defaultValue){
+ return createInputValue(STRING_TYPE, description, defaultValue);
+ }
+
+ public static LinkedHashMap<String, Object> createStringInput(Object defaultValue){
+ return createInputValue(STRING_TYPE, defaultValue);
+ }
+
public static String joinUnderscore(String firstValue, String secondValue){
return firstValue + "_" + secondValue;
}