summaryrefslogtreecommitdiffstats
path: root/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java
diff options
context:
space:
mode:
authorVijay Venkatesh Kumar <vv770d@att.com>2020-02-19 17:35:15 +0000
committerGerrit Code Review <gerrit@onap.org>2020-02-19 17:35:15 +0000
commit38808a23e76deb763a39f457a15b2ef56282b609 (patch)
tree2dc309b32cd3154a7268b5e319b15e58ac3e320d /mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java
parentfc08a5916376cb6164bd4a6a3f8f2ee43fe85a5d (diff)
parent7b27a8acf25d5d92a0160360175b5d0ecd2ef4d7 (diff)
Merge "Added policyNodes, db, tls support"
Diffstat (limited to 'mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java')
-rw-r--r--mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java51
1 files changed, 30 insertions, 21 deletions
diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java
index 10092c8..7d78e3d 100644
--- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java
+++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java
@@ -23,8 +23,6 @@ package org.onap.blueprintgenerator.models.blueprint;
import java.util.LinkedHashMap;
import java.util.TreeMap;
-import org.onap.blueprintgenerator.models.componentspec.ComponentSpec;
-
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@@ -32,12 +30,13 @@ import lombok.Getter; import lombok.Setter;
@JsonInclude(value=Include.NON_NULL)
@Getter @Setter
public class DmaapObj {
- private String dmaap_info;
+ private Object dmaap_info;
private String type;
private GetInput pass;
private GetInput user;
- public TreeMap<String, LinkedHashMap<String, Object>> createOnapDmaapMRObj(TreeMap<String, LinkedHashMap<String, Object>> inps, String config, char type, String n, String num) {
+ public TreeMap<String, LinkedHashMap<String, Object>> createOnapDmaapMRObj(TreeMap<String, LinkedHashMap<String, Object>> inps,
+ String config, char type, String n, String num, boolean isDmaap) {
TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
LinkedHashMap<String, Object> stringType = new LinkedHashMap();
stringType.put("type", "string");
@@ -45,31 +44,41 @@ public class DmaapObj {
//set the dmaapinfo
DmaapInfo info = new DmaapInfo();
- String infoType = "<<" + n + ">>";
- this.setDmaap_info(infoType);
-
- //set username
- GetInput u = new GetInput();
- u.setGet_input(config + "_" + num +"_aaf_username");
- this.setUser(u);
- retInputs.put(config + "_" + num +"_aaf_username", stringType);
-
- //set password
- GetInput p = new GetInput();
- p.setGet_input(config + "_" + num +"_aaf_password");
- this.setPass(p);
- retInputs.put(config + "_" + num +"_aaf_password", stringType);
+ if(!isDmaap){
+ info.createOnapDmaapMRInfo(inps, config, type);
+ this.setDmaap_info(info);
+ }
+ else{
+ String infoType = "<<" + n + ">>";
+ this.setDmaap_info(infoType);
+ //set username
+ GetInput u = new GetInput();
+ u.setGet_input(config + "_" + num +"_aaf_username");
+ this.setUser(u);
+ retInputs.put(config + "_" + num +"_aaf_username", stringType);
+ //set password
+ GetInput p = new GetInput();
+ p.setGet_input(config + "_" + num +"_aaf_password");
+ this.setPass(p);
+ retInputs.put(config + "_" + num +"_aaf_password", stringType);
+ }
return retInputs;
}
- public TreeMap<String, LinkedHashMap<String, Object>> createOnapDmaapDRObj(TreeMap<String, LinkedHashMap<String, Object>> inps, String config, char type, String n, String num) {
+ public TreeMap<String, LinkedHashMap<String, Object>> createOnapDmaapDRObj(TreeMap<String, LinkedHashMap<String, Object>> inps, String config, char type, String n, String num, boolean isDmaap) {
TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
retInputs = inps;
//set the dmaapinfo
DmaapInfo info = new DmaapInfo();
- String infoType = "<<" + n + ">>";
- this.setDmaap_info(infoType);
+ if(!isDmaap){
+ info.createOnapDmaapDRInfo(inps, config, type);
+ this.setDmaap_info(info);
+ }
+ else {
+ String infoType = "<<" + n + ">>";
+ this.setDmaap_info(infoType);
+ }
return retInputs;
}
}