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 private static final long serialVersionUID = 1L;
45 protected Map<String, List<String>> servicesCalls = new LinkedHashMap<>();
46 protected Map<String, PublisherDetails> streamsPublishes = new LinkedHashMap<>();
47 protected Map<String, SubscriberDetails> streamsSubscribes = new LinkedHashMap<>();
50 * Publisher and Subscriber common properties
53 @ToString(exclude = "aafPassword")
54 public static class PubSubCommonDetails implements ConfigBindingServiceModel {
56 private static final long serialVersionUID = 1L;
59 private String aafUsername;
60 private String aafPassword;
61 private DmaapInfo dmaapInfo;
63 // custom additional properties
64 private String proxyUrl;
65 private Boolean ignoreSSLValidation;
74 @RequiredArgsConstructor
75 @ToString(callSuper = true)
76 @EqualsAndHashCode(callSuper = true)
77 public static class PublisherDetails extends PubSubCommonDetails {
79 private static final long serialVersionUID = 1L;
89 @RequiredArgsConstructor
90 @ToString(callSuper = true)
91 @EqualsAndHashCode(callSuper = true)
92 public static class SubscriberDetails extends PubSubCommonDetails {
94 private static final long serialVersionUID = 1L;
96 // custom subscriber properties
97 private String consumerGroup;
98 private List<String> consumerIds;
99 private Integer messageLimit;
100 private Integer timeout;
102 // custom polling configuration
103 private Polling polling;
110 public static class DmaapInfo implements ConfigBindingServiceModel {
112 private static final long serialVersionUID = 1L;
114 private String clientRole;
115 private String clientId;
116 private String location;
117 private String topicUrl;
126 public static class Polling implements ConfigBindingServiceModel {
128 private static final long serialVersionUID = 1L;
130 private Integer fixedRate;
131 private AutoAdjusting autoAdjusting;
137 * Auto Adjusting Polling Details
140 public static class AutoAdjusting implements ConfigBindingServiceModel {
142 private static final long serialVersionUID = 1L;
145 private Integer stepUp;
147 private Integer stepDown;