Initial TCA commit into DCAEGEN2
[dcaegen2/analytics/tca.git] / dcae-analytics-cdap-common / src / main / java / org / openecomp / dcae / apod / analytics / cdap / common / CDAPComponentsConstants.java
1 /*
2  * ===============================LICENSE_START======================================
3  *  dcae-analytics
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
10  *
11  *          http://www.apache.org/licenses/LICENSE-2.0
12  *
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===========================================
19  */
20
21 package org.openecomp.dcae.apod.analytics.cdap.common;
22
23 /**
24  *  Contains static constant variable names and values of all DCAE CDAP Components for
25  *  e.g. app names, app descriptions, streams, datasets, flows, flowlets, workers, outputs etc.
26  *
27  *  <p>
28  *      A strict naming convention must be followed for variable names for CDAP Components names for proper
29  *      identification of CDAP Component variable purpose and function. A custom configuration settings can be
30  *      generated for app
31  *      deployment purposes based on variable naming conventions.
32  *
33  *      The variable names should have 4 parts separated by an underscore:
34  *          <ul>
35  *              <li>Name of the DCAE sub module (e.g. TCA) to which variable is applicable</li>
36  *              <li>Information about variable name:
37  *                  <ul>
38  *                      <li>FIXED - if variable value is fixed and cannot be changed</li>
39  *                      <li>DEFAULT - if variable name is default name and can be changed by cdap settings file
40  *                                    when application is created</li>
41  *                  </ul>
42  *              </li>
43  *              <li>Actual Descriptive name about the CDAP component (may contain underscrores) </li>
44  *              <li>CDAP component type e.g STREAM, DATASET, APP, FLOW, FLOWLET, OUTPUT</li>
45  *          </ul>
46  *
47  *  <p>e.g TCA_DEFAULT_DMAAP_INPUT_STREAM</p>
48  *
49  *  <p><strong>RegEx Format (DCAE MODULE NAME)_(FIXED|DEFAULT)_(VARIABLE NAME)_(CDAP COMPONENT TYPE)</strong></p>
50  *
51  * @author Rajiv Singla . Creation Date: 10/24/2016.
52  */
53 public abstract class CDAPComponentsConstants {
54
55     // ===============  Common Module Constants ==================== //
56
57     /**
58      * Default DCAE App Name. It should be overriden by sub modules
59      */
60     public static final String COMMON_DEFAULT_DCAE_CDAP_NAME_APP = "DCAE_ANALYTICS_GENERIC_APP";
61
62     /**
63      * Default DCAE App Description. It should be overriden by sub modules
64      */
65     public static final String COMMON_DEFAULT_DCAE_CDAP_DESCRIPTION_APP = "DCAE ANALYTICS GENERIC APP DESCRIPTION";
66
67     // ===============  TCA Module Constants ==================== //
68
69     /**
70      * Default TCA application name if application name is not provided from startup configuration
71      */
72     public static final String TCA_DEFAULT_NAME_APP = "dcae-tca";
73
74     /**
75      * Default TCA application description if not provided from startup configuration
76      */
77     public static final String TCA_DEFAULT_DESCRIPTION_APP = "DCAE Analytics Threshold Crossing Alert Application";
78
79     /**
80      * Default TCA DMaaP Subscriber output stream name if not provided from startup configuration
81      */
82     public static final String TCA_DEFAULT_SUBSCRIBER_OUTPUT_NAME_STREAM = "TCASubscriberOutputStream";
83
84
85     /**
86      * Fixed TCA DMaaP Subscriber output stream description
87      */
88     public static final String TCA_FIXED_SUBSCRIBER_OUTPUT_DESCRIPTION_STREAM =
89             "Stream which contains all message from VES Collector DMaaP MR topic";
90
91
92     /**
93      * Fixed Name of TCA DMaaP Subscriber Worker - which will be fetching DMaaP Messages posting them to CDAP stream
94      */
95     public static final String TCA_FIXED_DMAAP_SUBSCRIBER_WORKER = "TCADMaaPMRSubscriberWorker";
96
97     /**
98      * Fixed Description of TCA DMaaP Subscriber Worker
99      */
100     public static final String TCA_FIXED_DMAAP_SUBSCRIBER_DESCRIPTION_WORKER =
101             "Fetches messages from DMaaP MR Topic at frequent intervals and writes them to a CDAP stream";
102
103     /**
104      * Fixed Name of TCA DMaaP Publisher Worker - which will be publishing messages to DMaaP MR
105      */
106     public static final String TCA_FIXED_DMAAP_PUBLISHER_WORKER = "TCADMaaPMRPublisherWorker";
107
108     /**
109      * Fixed Description of TCA DMaaP Publisher Worker
110      */
111     public static final String TCA_FIXED_DMAAP_PUBLISHER_DESCRIPTION_WORKER =
112             "Polls TCA Alerts Table at frequent intervals for new alerts and publishes them to DMaaP MR Topic";
113
114     /**
115      * Fixed name for TCA VES Collector Messages Processing Flow
116      */
117     public static final String TCA_FIXED_VES_COLLECTOR_NAME_FLOW = "TCAVESCollectorFlow";
118
119
120     /**
121      * Fixed description for TCA VES Collector Messages Processing Flow
122      */
123     public static final String TCA_FIXED_VES_COLLECTOR_DESCRIPTION_FLOW = "Flow performs TCA on VES Collector Messages";
124
125
126     /**
127      * Fixed Name for TCA VES Message Router Flowlet
128      */
129     public static final String TCA_FIXED_VES_MESSAGE_ROUTER_NAME_FLOWLET = "TCAVESMessageRouterFlowlet";
130
131     /**
132      * Fixed Description for TCA VES Message Router Flowlet
133      */
134     public static final String TCA_FIXED_VES_MESSAGE_ROUTER_DESCRIPTION_FLOWLET =
135             "Routes message received from TCA VES Collector to TCA Threshold Calculator Flowlet instances";
136
137     /**
138      * Fixed TCA VES Message Router Flowlet Output
139      */
140     public static final String TCA_FIXED_VES_MESSAGE_ROUTER_OUTPUT = "TCAVESMessageRouterFlowlet";
141
142     /**
143      * Fixed Name for TCA VES Message Policy Violated Threshold Calculator Flowlet
144      */
145     public static final String TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_NAME_FLOWLET =
146             "TCAVESThresholdViolationCalculatorFlowlet";
147
148     /**
149      * Fixed Description for TCA VES Message Policy Violated Threshold Calculator Flowlet
150      */
151     public static final String TCA_FIXED_VES_THRESHOLD_VIOLATION_CALCULATOR_DESCRIPTION_FLOWLET =
152             "Applies TCA Policy Thresholds to VES Message and determined if any message violated TCA Policy thresholds";
153
154     /**
155      * Fixed Name for TCA VES Message Policy Violated Threshold Calculator Output
156      */
157     public static final String TCA_FIXED_VES_TCA_CALCULATOR_NAME_OUTPUT = "TCAThresholdViolationCalculatorOutput";
158
159
160     /**
161      * Fixed Name for TCA VES Alerts Sink Flowlet
162      */
163     public static final String TCA_FIXED_VES_ALERTS_SINK_NAME_FLOWLET = "TCAVESAlertsSinkFlowlet";
164
165     /**
166      * Fixed Description for TCA VES Alerts Sink Flowlet
167      */
168     public static final String TCA_FIXED_VES_ALERTS_SINK_DESCRIPTION_FLOWLET =
169             "Saves messages which violated TCA Policy in a data set";
170
171
172     /**
173      * Default Name for TCA VES Message status table which contain status of all messages processed by TCA
174      */
175     public static final String TCA_DEFAULT_VES_MESSAGE_STATUS_NAME_TABLE = "TCAVESMessageStatusTable";
176
177
178     /**
179      * Fixed Description for TCA VES Message status table which contain status of all messages processed by TCA
180      */
181     public static final String TCA_FIXED_VES_MESSAGE_STATUS_DESCRIPTION_TABLE =
182             "Store processing information about all incoming TCA VES Messages";
183
184     /**
185      * Default Name for TCA VES Alerts table which contains alerts that can be send to downstream systems
186      */
187     public static final String TCA_DEFAULT_VES_ALERTS_NAME_TABLE = "TCAVESAlertsTable";
188
189     /**
190      * Fixed Description for TCA VES Alerts table which contains alerts that can be send to downstream systems
191      */
192     public static final String TCA_DEFAULT_VES_ALERTS_DESCRIPTION_TABLE =
193             "Stores alert messages that need to be DMaaP";
194
195
196     private CDAPComponentsConstants() {
197
198     }
199
200 }