f7fc4a21c6f281ece1dfe5d28408823ac633df48
[aai/sparky-be.git] / src / main / java / org / onap / aai / sparky / viewandinspect / config / TierSupportUiConstants.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017 Amdocs
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *       http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  *
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  */
23 package org.onap.aai.sparky.viewandinspect.config;
24
25 /**
26  * The Class TierSupportUiConstants.
27  */
28 public class TierSupportUiConstants {
29
30   public static String APP_NAME = "AAIUI";
31
32   /** Default to unix file separator if system property file.separator is null */
33   public static final String FILESEP =
34       (System.getProperty("file.separator") == null) ? "/" : System.getProperty("file.separator");
35
36   public static String CONFIG_HOME = System.getProperty("CONFIG_HOME") + FILESEP;
37   public static String AJSC_HOME = System.getProperty("AJSC_HOME") + FILESEP;
38   public static String CONFIG_ROOT_LOCATION = AJSC_HOME + "bundleconfig" + FILESEP + "etc" + FILESEP;
39   public static String STATIC_CONFIG_APP_LOCATION = CONFIG_ROOT_LOCATION + "appprops" + FILESEP;
40   public static String DYNAMIC_CONFIG_APP_LOCATION = CONFIG_HOME;
41
42   public static String CONFIG_OXM_LOCATION = CONFIG_HOME + "model" + FILESEP;
43
44   public static String CONFIG_AUTH_LOCATION = CONFIG_HOME + "auth" + FILESEP;
45
46   public static String HOST = "host";
47   public static String PORT = "port";
48   public static String RETRIES = "numRequestRetries";
49   public static String RESOURCE_VERSION = "resource-version";
50   public static String URI = "URI";
51
52   public static String USERS_FILE_LOCATION = DYNAMIC_CONFIG_APP_LOCATION + "users.config";
53   public static String ROLES_FILE_LOCATION = DYNAMIC_CONFIG_APP_LOCATION + "roles.config";
54   public static String PORTAL_AUTHENTICATION_FILE_LOCATION = DYNAMIC_CONFIG_APP_LOCATION + "portal" + FILESEP + "portal-authentication.properties";
55
56   public static final String ES_SUGGEST_API = "_suggest";
57   public static final String ES_COUNT_API = "_count";
58   public static final String ES_SEARCH_API = "_search";
59   
60   public static final String ENTITY_AUTO_SUGGEST_INDEX_NAME_DEFAULT = 
61       "entityautosuggestindex-localhost";
62   public static final String ENTITY_AUTO_SUGGEST_SETTINGS_FILE_DEFAULT =
63       "/etc/autoSuggestSettings.json";
64   public static final String ENTITY_AUTO_SUGGEST_MAPPINGS_FILE_DEFAULT =
65       "/etc/autoSuggestMappings.json";
66   public static final String ENTITY_DYNAMIC_MAPPINGS_FILE_DEFAULT =
67       "/etc/dynamicMappings.json";
68
69   // JUnit testing synchronizer.properties file
70   public static String TEST_CONFIG_FILE =
71       System.getProperty("user.dir") + FILESEP + "bundleconfig-local" + FILESEP + "etc" + FILESEP
72       + "appprops" + FILESEP + "synchronizer.properties";
73
74   // Injected Attributes
75   public static String URI_ATTR_NAME = "uri";
76
77   public static final String URI_VERSION_REGEX_PATTERN = "aai/v[\\d]+/";
78   
79   public static final String getConfigPath(String configFile){
80     return AJSC_HOME + FILESEP + configFile;
81   }
82   
83   public static final String getAggregationIndexName(String entityType){
84     return "aggregate_" + entityType + "_index";
85   }
86
87   /**
88    * @return the aPP_NAME
89    */
90   public static String getAPP_NAME() {
91     return APP_NAME;
92   }
93
94   /**
95    * @param aPP_NAME the aPP_NAME to set
96    */
97   public static void setAPP_NAME(String aPP_NAME) {
98     APP_NAME = aPP_NAME;
99   }
100
101   /**
102    * @return the cONFIG_HOME
103    */
104   public static String getCONFIG_HOME() {
105     return CONFIG_HOME;
106   }
107
108   /**
109    * @param cONFIG_HOME the cONFIG_HOME to set
110    */
111   public static void setCONFIG_HOME(String cONFIG_HOME) {
112     CONFIG_HOME = cONFIG_HOME;
113   }
114
115   /**
116    * @return the aJSC_HOME
117    */
118   public static String getAJSC_HOME() {
119     return AJSC_HOME;
120   }
121
122   /**
123    * @param aJSC_HOME the aJSC_HOME to set
124    */
125   public static void setAJSC_HOME(String aJSC_HOME) {
126     AJSC_HOME = aJSC_HOME;
127   }
128
129   /**
130    * @return the cONFIG_ROOT_LOCATION
131    */
132   public static String getCONFIG_ROOT_LOCATION() {
133     return CONFIG_ROOT_LOCATION;
134   }
135
136   /**
137    * @param cONFIG_ROOT_LOCATION the cONFIG_ROOT_LOCATION to set
138    */
139   public static void setCONFIG_ROOT_LOCATION(String cONFIG_ROOT_LOCATION) {
140     CONFIG_ROOT_LOCATION = cONFIG_ROOT_LOCATION;
141   }
142
143   /**
144    * @return the sTATIC_CONFIG_APP_LOCATION
145    */
146   public static String getSTATIC_CONFIG_APP_LOCATION() {
147     return STATIC_CONFIG_APP_LOCATION;
148   }
149
150   /**
151    * @param sTATIC_CONFIG_APP_LOCATION the sTATIC_CONFIG_APP_LOCATION to set
152    */
153   public static void setSTATIC_CONFIG_APP_LOCATION(String sTATIC_CONFIG_APP_LOCATION) {
154     STATIC_CONFIG_APP_LOCATION = sTATIC_CONFIG_APP_LOCATION;
155   }
156
157   /**
158    * @return the dYNAMIC_CONFIG_APP_LOCATION
159    */
160   public static String getDYNAMIC_CONFIG_APP_LOCATION() {
161     return DYNAMIC_CONFIG_APP_LOCATION;
162   }
163
164   /**
165    * @param dYNAMIC_CONFIG_APP_LOCATION the dYNAMIC_CONFIG_APP_LOCATION to set
166    */
167   public static void setDYNAMIC_CONFIG_APP_LOCATION(String dYNAMIC_CONFIG_APP_LOCATION) {
168     DYNAMIC_CONFIG_APP_LOCATION = dYNAMIC_CONFIG_APP_LOCATION;
169   }
170
171   /**
172    * @return the cONFIG_OXM_LOCATION
173    */
174   public static String getCONFIG_OXM_LOCATION() {
175     return CONFIG_OXM_LOCATION;
176   }
177
178   /**
179    * @param cONFIG_OXM_LOCATION the cONFIG_OXM_LOCATION to set
180    */
181   public static void setCONFIG_OXM_LOCATION(String cONFIG_OXM_LOCATION) {
182     CONFIG_OXM_LOCATION = cONFIG_OXM_LOCATION;
183   }
184
185   /**
186    * @return the cONFIG_AUTH_LOCATION
187    */
188   public static String getCONFIG_AUTH_LOCATION() {
189     return CONFIG_AUTH_LOCATION;
190   }
191
192   /**
193    * @param cONFIG_AUTH_LOCATION the cONFIG_AUTH_LOCATION to set
194    */
195   public static void setCONFIG_AUTH_LOCATION(String cONFIG_AUTH_LOCATION) {
196     CONFIG_AUTH_LOCATION = cONFIG_AUTH_LOCATION;
197   }
198
199   /**
200    * @return the hOST
201    */
202   public static String getHOST() {
203     return HOST;
204   }
205
206   /**
207    * @param hOST the hOST to set
208    */
209   public static void setHOST(String hOST) {
210     HOST = hOST;
211   }
212
213   /**
214    * @return the pORT
215    */
216   public static String getPORT() {
217     return PORT;
218   }
219
220   /**
221    * @param pORT the pORT to set
222    */
223   public static void setPORT(String pORT) {
224     PORT = pORT;
225   }
226
227   /**
228    * @return the rETRIES
229    */
230   public static String getRETRIES() {
231     return RETRIES;
232   }
233
234   /**
235    * @param rETRIES the rETRIES to set
236    */
237   public static void setRETRIES(String rETRIES) {
238     RETRIES = rETRIES;
239   }
240
241   /**
242    * @return the rESOURCE_VERSION
243    */
244   public static String getRESOURCE_VERSION() {
245     return RESOURCE_VERSION;
246   }
247
248   /**
249    * @param rESOURCE_VERSION the rESOURCE_VERSION to set
250    */
251   public static void setRESOURCE_VERSION(String rESOURCE_VERSION) {
252     RESOURCE_VERSION = rESOURCE_VERSION;
253   }
254
255   /**
256    * @return the uRI
257    */
258   public static String getURI() {
259     return URI;
260   }
261
262   /**
263    * @param uRI the uRI to set
264    */
265   public static void setURI(String uRI) {
266     URI = uRI;
267   }
268
269   /**
270    * @return the uSERS_FILE_LOCATION
271    */
272   public static String getUSERS_FILE_LOCATION() {
273     return USERS_FILE_LOCATION;
274   }
275
276   /**
277    * @param uSERS_FILE_LOCATION the uSERS_FILE_LOCATION to set
278    */
279   public static void setUSERS_FILE_LOCATION(String uSERS_FILE_LOCATION) {
280     USERS_FILE_LOCATION = uSERS_FILE_LOCATION;
281   }
282
283   /**
284    * @return the rOLES_FILE_LOCATION
285    */
286   public static String getROLES_FILE_LOCATION() {
287     return ROLES_FILE_LOCATION;
288   }
289
290   /**
291    * @param rOLES_FILE_LOCATION the rOLES_FILE_LOCATION to set
292    */
293   public static void setROLES_FILE_LOCATION(String rOLES_FILE_LOCATION) {
294     ROLES_FILE_LOCATION = rOLES_FILE_LOCATION;
295   }
296
297   /**
298    * @return the pORTAL_AUTHENTICATION_FILE_LOCATION
299    */
300   public static String getPORTAL_AUTHENTICATION_FILE_LOCATION() {
301     return PORTAL_AUTHENTICATION_FILE_LOCATION;
302   }
303
304   /**
305    * @param pORTAL_AUTHENTICATION_FILE_LOCATION the pORTAL_AUTHENTICATION_FILE_LOCATION to set
306    */
307   public static void setPORTAL_AUTHENTICATION_FILE_LOCATION(
308       String pORTAL_AUTHENTICATION_FILE_LOCATION) {
309     PORTAL_AUTHENTICATION_FILE_LOCATION = pORTAL_AUTHENTICATION_FILE_LOCATION;
310   }
311
312   /**
313    * @return the tEST_CONFIG_FILE
314    */
315   public static String getTEST_CONFIG_FILE() {
316     return TEST_CONFIG_FILE;
317   }
318
319   /**
320    * @param tEST_CONFIG_FILE the tEST_CONFIG_FILE to set
321    */
322   public static void setTEST_CONFIG_FILE(String tEST_CONFIG_FILE) {
323     TEST_CONFIG_FILE = tEST_CONFIG_FILE;
324   }
325
326   /**
327    * @return the uRI_ATTR_NAME
328    */
329   public static String getURI_ATTR_NAME() {
330     return URI_ATTR_NAME;
331   }
332
333   /**
334    * @param uRI_ATTR_NAME the uRI_ATTR_NAME to set
335    */
336   public static void setURI_ATTR_NAME(String uRI_ATTR_NAME) {
337     URI_ATTR_NAME = uRI_ATTR_NAME;
338   }
339
340   /**
341    * @return the filesep
342    */
343   public static String getFilesep() {
344     return FILESEP;
345   }
346
347   /**
348    * @return the esSuggestApi
349    */
350   public static String getEsSuggestApi() {
351     return ES_SUGGEST_API;
352   }
353
354   /**
355    * @return the esCountApi
356    */
357   public static String getEsCountApi() {
358     return ES_COUNT_API;
359   }
360
361   /**
362    * @return the esSearchApi
363    */
364   public static String getEsSearchApi() {
365     return ES_SEARCH_API;
366   }
367
368   /**
369    * @return the entityAutoSuggestIndexNameDefault
370    */
371   public static String getEntityAutoSuggestIndexNameDefault() {
372     return ENTITY_AUTO_SUGGEST_INDEX_NAME_DEFAULT;
373   }
374
375   /**
376    * @return the entityAutoSuggestSettingsFileDefault
377    */
378   public static String getEntityAutoSuggestSettingsFileDefault() {
379     return ENTITY_AUTO_SUGGEST_SETTINGS_FILE_DEFAULT;
380   }
381
382   /**
383    * @return the entityAutoSuggestMappingsFileDefault
384    */
385   public static String getEntityAutoSuggestMappingsFileDefault() {
386     return ENTITY_AUTO_SUGGEST_MAPPINGS_FILE_DEFAULT;
387   }
388
389   /**
390    * @return the entityDynamicMappingsFileDefault
391    */
392   public static String getEntityDynamicMappingsFileDefault() {
393     return ENTITY_DYNAMIC_MAPPINGS_FILE_DEFAULT;
394   }
395
396   /**
397    * @return the uriVersionRegexPattern
398    */
399   public static String getUriVersionRegexPattern() {
400     return URI_VERSION_REGEX_PATTERN;
401   }
402
403 }