summaryrefslogtreecommitdiffstats
path: root/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/common
diff options
context:
space:
mode:
Diffstat (limited to 'mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/common')
-rw-r--r--mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/common/blueprint/BlueprintHelper.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/common/blueprint/BlueprintHelper.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/common/blueprint/BlueprintHelper.java
index 16eca51..ef335a8 100644
--- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/common/blueprint/BlueprintHelper.java
+++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/common/blueprint/BlueprintHelper.java
@@ -27,6 +27,9 @@ import java.util.LinkedHashMap;
@UtilityClass
public class BlueprintHelper {
+ public static final String INTEGER_TYPE = "integer";
+ public static final String BOOLEAN_TYPE = "boolean";
+
public static LinkedHashMap<String, Object> createInputValue(String type, String description, Object defaultValue) {
LinkedHashMap<String, Object> inputMap = new LinkedHashMap<>();
inputMap.put("type", type);
@@ -34,4 +37,24 @@ public class BlueprintHelper {
inputMap.put("default", defaultValue);
return inputMap;
}
+
+ public static LinkedHashMap<String, Object> createIntegerInput(String description, Object defaultValue){
+ return createInputValue(INTEGER_TYPE, description, defaultValue);
+ }
+
+ public static LinkedHashMap<String, Object> createBooleanInput(String description, Object defaultValue){
+ return createInputValue(BOOLEAN_TYPE, description, defaultValue);
+ }
+
+ public static String joinUnderscore(String firstValue, String secondValue){
+ return firstValue + "_" + secondValue;
+ }
+
+ public static boolean isDataRouterType(String type) {
+ return type.equals("data_router") || type.equals("data router");
+ }
+
+ public static boolean isMessageRouterType(String type) {
+ return type.equals("message_router") || type.equals("message router");
+ }
}