diff options
author | Dhrumin Desai <dd303q@att.com> | 2020-02-06 14:26:41 -0500 |
---|---|---|
committer | Dhrumin Desai <dd303q@att.com> | 2020-02-19 12:18:30 -0500 |
commit | 7b27a8acf25d5d92a0160360175b5d0ecd2ef4d7 (patch) | |
tree | 5baa63878fff9188b3d14a34f6ff74b029d3133d /mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java | |
parent | 83f85998b01c7937b84549d81f5ec2a07958f96d (diff) |
Added policyNodes, db, tls support
Change-Id: Id960c156eb8da67e6792c6dbc1a60892d28703b0
Issue-ID: DCAEGEN2-164
Issue-ID: DCAEGEN2-1873
Issue-ID: DCAEGEN2-1995
Issue-ID: DCAEGEN2-1859
Signed-off-by: Dhrumin Desai <dd303q@att.com>
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.java | 51 |
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; } } |