1 /*============LICENSE_START=======================================================
3 ================================================================================
4 Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
5 Copyright (c) 2020 Nokia. All rights reserved.
6 ================================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ============LICENSE_END=========================================================
22 package org.onap.blueprintgenerator.models.blueprint.dmaap;
24 import com.fasterxml.jackson.annotation.JsonInclude;
25 import com.fasterxml.jackson.annotation.JsonInclude.Include;
28 import org.onap.blueprintgenerator.models.blueprint.GetInput;
30 import java.util.LinkedHashMap;
31 import java.util.TreeMap;
33 @JsonInclude(value=Include.NON_NULL)
35 public class DmaapObj {
36 private Object dmaap_info;
38 private GetInput pass;
39 private GetInput user;
41 public TreeMap<String, LinkedHashMap<String, Object>> createOnapDmaapMRObj(TreeMap<String, LinkedHashMap<String, Object>> inps,
42 String config, char type, String n, String num, boolean isDmaap) {
43 TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
44 LinkedHashMap<String, Object> stringType = new LinkedHashMap();
45 stringType.put("type", "string");
49 DmaapInfo info = new DmaapInfo();
51 info.createOnapDmaapMRInfo(inps, config, type);
52 this.setDmaap_info(info);
55 String infoType = "<<" + n + ">>";
56 this.setDmaap_info(infoType);
58 GetInput u = new GetInput();
59 u.setBpInputName(config + "_" + num +"_aaf_username");
61 retInputs.put(config + "_" + num +"_aaf_username", stringType);
64 GetInput p = new GetInput();
65 p.setBpInputName(config + "_" + num +"_aaf_password");
67 retInputs.put(config + "_" + num +"_aaf_password", stringType);
71 public TreeMap<String, LinkedHashMap<String, Object>> createOnapDmaapDRObj(TreeMap<String, LinkedHashMap<String, Object>> inps, String config, char type, String n, String num, boolean isDmaap) {
72 TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
76 DmaapInfo info = new DmaapInfo();
78 info.createOnapDmaapDRInfo(inps, config, type);
79 this.setDmaap_info(info);
82 String infoType = "<<" + n + ">>";
83 this.setDmaap_info(infoType);