2 * ===============================LICENSE_START======================================
4 * ================================================================================
5 * Copyright © 2017 AT&T Intellectual Property. 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===========================================
21 package org.openecomp.dcae.apod.analytics.cdap.tca.settings;
23 import com.google.common.base.Objects;
24 import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;
25 import org.openecomp.dcae.apod.analytics.cdap.common.settings.CDAPBaseAppConfig;
26 import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;
30 * Contains CDAP App Config Settings for TCA Application
32 * @author Rajiv Singla . Creation Date: 11/2/2016.
34 public class TCAAppConfig extends CDAPBaseAppConfig {
37 private static final long serialVersionUID = 1L;
39 protected String tcaSubscriberOutputStreamName;
40 protected Integer thresholdCalculatorFlowletInstances;
42 protected String tcaVESMessageStatusTableName;
43 protected Integer tcaVESMessageStatusTableTTLSeconds;
44 protected String tcaVESAlertsTableName;
45 protected Integer tcaVESAlertsTableTTLSeconds;
48 public TCAAppConfig() {
49 appName = CDAPComponentsConstants.TCA_DEFAULT_NAME_APP;
50 appDescription = CDAPComponentsConstants.TCA_DEFAULT_DESCRIPTION_APP;
51 tcaSubscriberOutputStreamName = CDAPComponentsConstants.TCA_DEFAULT_SUBSCRIBER_OUTPUT_NAME_STREAM;
52 thresholdCalculatorFlowletInstances = AnalyticsConstants.TCA_DEFAULT_THRESHOLD_CALCULATOR_FLOWLET_INSTANCES;
53 tcaVESMessageStatusTableName = CDAPComponentsConstants.TCA_DEFAULT_VES_MESSAGE_STATUS_NAME_TABLE;
54 tcaVESMessageStatusTableTTLSeconds = AnalyticsConstants.TCA_DEFAULT_VES_MESSAGE_STATUS_TTL_TABLE;
55 tcaVESAlertsTableName = CDAPComponentsConstants.TCA_DEFAULT_VES_ALERTS_NAME_TABLE;
56 tcaVESAlertsTableTTLSeconds = AnalyticsConstants.TCA_DEFAULT_VES_ALERTS_TTL_TABLE;
59 public String getTcaSubscriberOutputStreamName() {
60 return tcaSubscriberOutputStreamName;
63 public String getTcaVESMessageStatusTableName() {
64 return tcaVESMessageStatusTableName;
67 public Integer getTcaVESMessageStatusTableTTLSeconds() {
68 return tcaVESMessageStatusTableTTLSeconds;
71 public String getTcaVESAlertsTableName() {
72 return tcaVESAlertsTableName;
75 public Integer getTcaVESAlertsTableTTLSeconds() {
76 return tcaVESAlertsTableTTLSeconds;
79 public Integer getThresholdCalculatorFlowletInstances() {
80 return thresholdCalculatorFlowletInstances;
84 public String toString() {
85 return Objects.toStringHelper(this)
86 .add("appName", appName)
87 .add("appDescription", appDescription)
88 .add("tcaSubscriberOutputStreamName", tcaSubscriberOutputStreamName)
89 .add("thresholdCalculatorFlowletInstances", thresholdCalculatorFlowletInstances)
90 .add("tcaVESMessageStatusTableName", tcaVESMessageStatusTableName)
91 .add("tcaVESMessageStatusTableTTLSeconds", tcaVESMessageStatusTableTTLSeconds)
92 .add("tcaVESAlertsTableName", tcaVESAlertsTableName)
93 .add("tcaVESAlertsTableTTLSeconds", tcaVESAlertsTableTTLSeconds)