TCA: Support for VES/A&AI enrichment
[dcaegen2/analytics/tca.git] / dcae-analytics-cdap-tca / src / main / java / org / openecomp / dcae / apod / analytics / cdap / tca / settings / TCAAppConfig.java
1 /*\r
2  * ===============================LICENSE_START======================================\r
3  *  dcae-analytics\r
4  * ================================================================================\r
5  *    Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
6  * ================================================================================\r
7  *  Licensed under the Apache License, Version 2.0 (the "License");\r
8  *  you may not use this file except in compliance with the License.\r
9  *   You may obtain a copy of the License at\r
10  *\r
11  *          http://www.apache.org/licenses/LICENSE-2.0\r
12  *\r
13  *  Unless required by applicable law or agreed to in writing, software\r
14  *  distributed under the License is distributed on an "AS IS" BASIS,\r
15  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  *  See the License for the specific language governing permissions and\r
17  *  limitations under the License.\r
18  *  ============================LICENSE_END===========================================\r
19  */\r
20 \r
21 package org.openecomp.dcae.apod.analytics.cdap.tca.settings;\r
22 \r
23 import com.google.common.base.Objects;\r
24 import org.openecomp.dcae.apod.analytics.cdap.common.CDAPComponentsConstants;\r
25 import org.openecomp.dcae.apod.analytics.cdap.common.settings.CDAPBaseAppConfig;\r
26 import org.openecomp.dcae.apod.analytics.common.AnalyticsConstants;\r
27 \r
28 \r
29 /**\r
30  * Contains CDAP App Config Settings for TCA Application\r
31  *\r
32  * @author Rajiv Singla . Creation Date: 11/2/2016.\r
33  */\r
34 public class TCAAppConfig extends CDAPBaseAppConfig {\r
35 \r
36 \r
37     private static final long serialVersionUID = 1L;\r
38 \r
39     protected String tcaSubscriberOutputStreamName;\r
40     protected Integer thresholdCalculatorFlowletInstances;\r
41 \r
42     protected String tcaVESMessageStatusTableName;\r
43     protected Integer tcaVESMessageStatusTableTTLSeconds;\r
44     protected String tcaVESAlertsTableName;\r
45     protected Integer tcaVESAlertsTableTTLSeconds;\r
46     protected String tcaAlertsAbatementTableName;\r
47     protected Integer tcaAlertsAbatementTableTTLSeconds;\r
48 \r
49 \r
50     public TCAAppConfig() {\r
51         appName = CDAPComponentsConstants.TCA_DEFAULT_NAME_APP;\r
52         appDescription = CDAPComponentsConstants.TCA_DEFAULT_DESCRIPTION_APP;\r
53         tcaSubscriberOutputStreamName = CDAPComponentsConstants.TCA_DEFAULT_SUBSCRIBER_OUTPUT_NAME_STREAM;\r
54         thresholdCalculatorFlowletInstances = AnalyticsConstants.TCA_DEFAULT_THRESHOLD_CALCULATOR_FLOWLET_INSTANCES;\r
55         tcaVESMessageStatusTableName = CDAPComponentsConstants.TCA_DEFAULT_VES_MESSAGE_STATUS_NAME_TABLE;\r
56         tcaVESMessageStatusTableTTLSeconds = AnalyticsConstants.TCA_DEFAULT_VES_MESSAGE_STATUS_TTL_TABLE;\r
57         tcaVESAlertsTableName = CDAPComponentsConstants.TCA_DEFAULT_VES_ALERTS_NAME_TABLE;\r
58         tcaVESAlertsTableTTLSeconds = AnalyticsConstants.TCA_DEFAULT_VES_ALERTS_TTL_TABLE;\r
59         tcaAlertsAbatementTableName = CDAPComponentsConstants.TCA_DEFAULT_ALERTS_ABATEMENT_NAME_TABLE;\r
60         tcaAlertsAbatementTableTTLSeconds = AnalyticsConstants.TCA_DEFAULT_ALERTS_ABATEMENT_TTL_TABLE;\r
61     }\r
62 \r
63     public String getTcaSubscriberOutputStreamName() {\r
64         return tcaSubscriberOutputStreamName;\r
65     }\r
66 \r
67     public String getTcaVESMessageStatusTableName() {\r
68         return tcaVESMessageStatusTableName;\r
69     }\r
70 \r
71     public Integer getTcaVESMessageStatusTableTTLSeconds() {\r
72         return tcaVESMessageStatusTableTTLSeconds;\r
73     }\r
74 \r
75     public String getTcaVESAlertsTableName() {\r
76         return tcaVESAlertsTableName;\r
77     }\r
78 \r
79     public Integer getTcaVESAlertsTableTTLSeconds() {\r
80         return tcaVESAlertsTableTTLSeconds;\r
81     }\r
82 \r
83     public Integer getThresholdCalculatorFlowletInstances() {\r
84         return thresholdCalculatorFlowletInstances;\r
85     }\r
86 \r
87     public String getTcaAlertsAbatementTableName() {\r
88         return tcaAlertsAbatementTableName;\r
89     }\r
90 \r
91     public Integer getTcaAlertsAbatementTableTTLSeconds() {\r
92         return tcaAlertsAbatementTableTTLSeconds;\r
93     }\r
94 \r
95     @Override\r
96     public String toString() {\r
97         return Objects.toStringHelper(this)\r
98                 .add("appName", appName)\r
99                 .add("appDescription", appDescription)\r
100                 .add("tcaSubscriberOutputStreamName", tcaSubscriberOutputStreamName)\r
101                 .add("thresholdCalculatorFlowletInstances", thresholdCalculatorFlowletInstances)\r
102                 .add("tcaVESMessageStatusTableName", tcaVESMessageStatusTableName)\r
103                 .add("tcaVESMessageStatusTableTTLSeconds", tcaVESMessageStatusTableTTLSeconds)\r
104                 .add("tcaVESAlertsTableName", tcaVESAlertsTableName)\r
105                 .add("tcaVESAlertsTableTTLSeconds", tcaVESAlertsTableTTLSeconds)\r
106                 .add("tcaAlertsAbatementTableName", tcaAlertsAbatementTableName)\r
107                 .add("tcaAlertsAbatementTableTTLSeconds", tcaAlertsAbatementTableTTLSeconds)\r
108                 .toString();\r
109     }\r
110 }\r