2 * ================================================================================
3 * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 * ============LICENSE_END=========================================================
20 package org.onap.dcae.analytics.model.configbindingservice;
23 import lombok.EqualsAndHashCode;
25 import lombok.RequiredArgsConstructor;
27 import lombok.ToString;
29 import java.util.LinkedHashMap;
30 import java.util.List;
34 * Base call for Controller Config Binding Service Properties. Other analytics components
35 * must extend this base class and add properties specific to their requirements
36 * <p>NOTE: The base class supports all standard config binding service properties and additional custom properties</p>
38 * @author Rajiv Singla
41 public abstract class BaseConfigBindingServiceProperties implements ConfigBindingServiceModel {
43 protected Map<String, List<String>> servicesCalls = new LinkedHashMap<>();
44 protected Map<String, PublisherDetails> streamsPublishes = new LinkedHashMap<>();
45 protected Map<String, SubscriberDetails> streamsSubscribes = new LinkedHashMap<>();
48 * Publisher and Subscriber common properties
51 @ToString(exclude = "aafPassword")
52 public static class PubSubCommonDetails {
55 private String aafUsername;
56 private String aafPassword;
57 private DmaapInfo dmaapInfo;
59 // custom additional properties
60 private String proxyUrl;
61 private Boolean ignoreSSLValidation;
70 @RequiredArgsConstructor
71 @ToString(callSuper = true)
72 @EqualsAndHashCode(callSuper = true)
73 public static class PublisherDetails extends PubSubCommonDetails {
83 @RequiredArgsConstructor
84 @ToString(callSuper = true)
85 @EqualsAndHashCode(callSuper = true)
86 public static class SubscriberDetails extends PubSubCommonDetails {
88 // custom subscriber properties
89 private String consumerGroup;
90 private List<String> consumerIds;
91 private Integer messageLimit;
92 private Integer timeout;
94 // custom polling configuration
95 private Polling polling;
102 public static class DmaapInfo {
104 private String clientRole;
105 private String clientId;
106 private String location;
107 private String topicUrl;
116 public static class Polling {
118 private Integer fixedRate;
119 private AutoAdjusting autoAdjusting;
125 * Auto Adjusting Polling Details
128 public static class AutoAdjusting {
131 private Integer stepUp;
133 private Integer stepDown;