Adding back-end support for UI filters
[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 =
39       AJSC_HOME + "bundleconfig" + FILESEP + "etc" + FILESEP;
40   public static String STATIC_CONFIG_APP_LOCATION = CONFIG_ROOT_LOCATION + "appprops" + FILESEP;
41   public static String DYNAMIC_CONFIG_APP_LOCATION = CONFIG_HOME;
42
43   public static String CONFIG_OXM_LOCATION = CONFIG_HOME + "model" + FILESEP;
44   public static String CONFIG_FILTERS_BASE_LOCATION = CONFIG_HOME + FILESEP;
45   public static String CONFIG_AUTH_LOCATION = CONFIG_HOME + "auth" + FILESEP;
46
47   public static String HOST = "host";
48   public static String PORT = "port";
49   public static String RETRIES = "numRequestRetries";
50   public static String RESOURCE_VERSION = "resource-version";
51   public static String URI = "URI";
52
53   public static String USERS_FILE_LOCATION = DYNAMIC_CONFIG_APP_LOCATION + "users.config";
54   public static String ROLES_FILE_LOCATION = DYNAMIC_CONFIG_APP_LOCATION + "roles.config";
55   public static String PORTAL_AUTHENTICATION_FILE_LOCATION =
56       DYNAMIC_CONFIG_APP_LOCATION + "portal" + FILESEP + "portal-authentication.properties";
57
58   public static final String ES_SUGGEST_API = "_suggest";
59   public static final String ES_COUNT_API = "_count";
60   public static final String ES_SEARCH_API = "_search";
61
62   public static final String UI_FILTER_VIEW_NAME_PARAMETER = "viewName";
63   public static final String UI_FILTER_ID_LIST_PARAMETER = "filterIdList";
64
65   public static final String ENTITY_AUTO_SUGGEST_INDEX_NAME_DEFAULT =
66       "entityautosuggestindex-localhost";
67   public static final String ENTITY_AUTO_SUGGEST_SETTINGS_FILE_DEFAULT =
68       "/etc/autoSuggestSettings.json";
69   public static final String ENTITY_AUTO_SUGGEST_MAPPINGS_FILE_DEFAULT =
70       "/etc/autoSuggestMappings.json";
71   public static final String ENTITY_DYNAMIC_MAPPINGS_FILE_DEFAULT = "/etc/dynamicMappings.json";
72   public static final String FILTER_LIST_FILE_DEFAULT =
73       CONFIG_FILTERS_BASE_LOCATION + "filters" + FILESEP + "aaiui_filters.json";
74   public static final String FILTER_MAPPING_FILE_DEFAULT =
75       CONFIG_FILTERS_BASE_LOCATION + "filters" + FILESEP + "aaiui_views.json";
76
77   // JUnit testing synchronizer.properties file
78   public static String TEST_CONFIG_FILE =
79       System.getProperty("user.dir") + FILESEP + "bundleconfig-local" + FILESEP + "etc" + FILESEP
80           + "appprops" + FILESEP + "synchronizer.properties";
81
82   // Injected Attributes
83   public static String URI_ATTR_NAME = "uri";
84
85   public static final String URI_VERSION_REGEX_PATTERN = "aai/v[\\d]+/";
86
87   public static final String getConfigPath(String configFile) {
88     return AJSC_HOME + FILESEP + configFile;
89   }
90
91   public static final String getAggregationIndexName(String entityType) {
92     return "aggregate_" + entityType + "_index";
93   }
94
95   /**
96    * @return the aPP_NAME
97    */
98   public static String getAPP_NAME() {
99     return APP_NAME;
100   }
101
102   /**
103    * @param aPP_NAME the aPP_NAME to set
104    */
105   public static void setAPP_NAME(String aPP_NAME) {
106     APP_NAME = aPP_NAME;
107   }
108
109   /**
110    * @return the cONFIG_HOME
111    */
112   public static String getCONFIG_HOME() {
113     return CONFIG_HOME;
114   }
115
116   /**
117    * @param cONFIG_HOME the cONFIG_HOME to set
118    */
119   public static void setCONFIG_HOME(String cONFIG_HOME) {
120     CONFIG_HOME = cONFIG_HOME;
121   }
122
123   /**
124    * @return the aJSC_HOME
125    */
126   public static String getAJSC_HOME() {
127     return AJSC_HOME;
128   }
129
130   /**
131    * @param aJSC_HOME the aJSC_HOME to set
132    */
133   public static void setAJSC_HOME(String aJSC_HOME) {
134     AJSC_HOME = aJSC_HOME;
135   }
136
137   /**
138    * @return the cONFIG_ROOT_LOCATION
139    */
140   public static String getCONFIG_ROOT_LOCATION() {
141     return CONFIG_ROOT_LOCATION;
142   }
143
144   /**
145    * @param cONFIG_ROOT_LOCATION the cONFIG_ROOT_LOCATION to set
146    */
147   public static void setCONFIG_ROOT_LOCATION(String cONFIG_ROOT_LOCATION) {
148     CONFIG_ROOT_LOCATION = cONFIG_ROOT_LOCATION;
149   }
150
151   /**
152    * @return the sTATIC_CONFIG_APP_LOCATION
153    */
154   public static String getSTATIC_CONFIG_APP_LOCATION() {
155     return STATIC_CONFIG_APP_LOCATION;
156   }
157
158   /**
159    * @param sTATIC_CONFIG_APP_LOCATION the sTATIC_CONFIG_APP_LOCATION to set
160    */
161   public static void setSTATIC_CONFIG_APP_LOCATION(String sTATIC_CONFIG_APP_LOCATION) {
162     STATIC_CONFIG_APP_LOCATION = sTATIC_CONFIG_APP_LOCATION;
163   }
164
165   /**
166    * @return the dYNAMIC_CONFIG_APP_LOCATION
167    */
168   public static String getDYNAMIC_CONFIG_APP_LOCATION() {
169     return DYNAMIC_CONFIG_APP_LOCATION;
170   }
171
172   /**
173    * @param dYNAMIC_CONFIG_APP_LOCATION the dYNAMIC_CONFIG_APP_LOCATION to set
174    */
175   public static void setDYNAMIC_CONFIG_APP_LOCATION(String dYNAMIC_CONFIG_APP_LOCATION) {
176     DYNAMIC_CONFIG_APP_LOCATION = dYNAMIC_CONFIG_APP_LOCATION;
177   }
178
179   /**
180    * @return the cONFIG_OXM_LOCATION
181    */
182   public static String getCONFIG_OXM_LOCATION() {
183     return CONFIG_OXM_LOCATION;
184   }
185
186   /**
187    * @param cONFIG_OXM_LOCATION the cONFIG_OXM_LOCATION to set
188    */
189   public static void setCONFIG_OXM_LOCATION(String cONFIG_OXM_LOCATION) {
190     CONFIG_OXM_LOCATION = cONFIG_OXM_LOCATION;
191   }
192
193   /**
194    * @return the cONFIG_FILTERS_BASE_LOCATION
195    */
196   public static String getCONFIG_FILTERS_BASE_LOCATION() {
197     return CONFIG_FILTERS_BASE_LOCATION;
198   }
199
200   /**
201    * @param cONFIG_FILTERS_BASE_LOCATION the cONFIG_FILTERS_BASE_LOCATION to set
202    */
203   public static void setCONFIG_FILTERS_BASE_LOCATION(String cONFIG_FILTERS_BASE_LOCATION) {
204     CONFIG_FILTERS_BASE_LOCATION = cONFIG_FILTERS_BASE_LOCATION;
205   }
206
207
208   /**
209    * @return the cONFIG_AUTH_LOCATION
210    */
211   public static String getCONFIG_AUTH_LOCATION() {
212     return CONFIG_AUTH_LOCATION;
213   }
214
215   /**
216    * @param cONFIG_AUTH_LOCATION the cONFIG_AUTH_LOCATION to set
217    */
218   public static void setCONFIG_AUTH_LOCATION(String cONFIG_AUTH_LOCATION) {
219     CONFIG_AUTH_LOCATION = cONFIG_AUTH_LOCATION;
220   }
221
222   /**
223    * @return the hOST
224    */
225   public static String getHOST() {
226     return HOST;
227   }
228
229   /**
230    * @param hOST the hOST to set
231    */
232   public static void setHOST(String hOST) {
233     HOST = hOST;
234   }
235
236   /**
237    * @return the pORT
238    */
239   public static String getPORT() {
240     return PORT;
241   }
242
243   /**
244    * @param pORT the pORT to set
245    */
246   public static void setPORT(String pORT) {
247     PORT = pORT;
248   }
249
250   /**
251    * @return the rETRIES
252    */
253   public static String getRETRIES() {
254     return RETRIES;
255   }
256
257   /**
258    * @param rETRIES the rETRIES to set
259    */
260   public static void setRETRIES(String rETRIES) {
261     RETRIES = rETRIES;
262   }
263
264   /**
265    * @return the rESOURCE_VERSION
266    */
267   public static String getRESOURCE_VERSION() {
268     return RESOURCE_VERSION;
269   }
270
271   /**
272    * @param rESOURCE_VERSION the rESOURCE_VERSION to set
273    */
274   public static void setRESOURCE_VERSION(String rESOURCE_VERSION) {
275     RESOURCE_VERSION = rESOURCE_VERSION;
276   }
277
278   /**
279    * @return the uRI
280    */
281   public static String getURI() {
282     return URI;
283   }
284
285   /**
286    * @param uRI the uRI to set
287    */
288   public static void setURI(String uRI) {
289     URI = uRI;
290   }
291
292   /**
293    * @return the uSERS_FILE_LOCATION
294    */
295   public static String getUSERS_FILE_LOCATION() {
296     return USERS_FILE_LOCATION;
297   }
298
299   /**
300    * @param uSERS_FILE_LOCATION the uSERS_FILE_LOCATION to set
301    */
302   public static void setUSERS_FILE_LOCATION(String uSERS_FILE_LOCATION) {
303     USERS_FILE_LOCATION = uSERS_FILE_LOCATION;
304   }
305
306   /**
307    * @return the rOLES_FILE_LOCATION
308    */
309   public static String getROLES_FILE_LOCATION() {
310     return ROLES_FILE_LOCATION;
311   }
312
313   /**
314    * @param rOLES_FILE_LOCATION the rOLES_FILE_LOCATION to set
315    */
316   public static void setROLES_FILE_LOCATION(String rOLES_FILE_LOCATION) {
317     ROLES_FILE_LOCATION = rOLES_FILE_LOCATION;
318   }
319
320   /**
321    * @return the pORTAL_AUTHENTICATION_FILE_LOCATION
322    */
323   public static String getPORTAL_AUTHENTICATION_FILE_LOCATION() {
324     return PORTAL_AUTHENTICATION_FILE_LOCATION;
325   }
326
327   /**
328    * @param pORTAL_AUTHENTICATION_FILE_LOCATION the pORTAL_AUTHENTICATION_FILE_LOCATION to set
329    */
330   public static void setPORTAL_AUTHENTICATION_FILE_LOCATION(
331       String pORTAL_AUTHENTICATION_FILE_LOCATION) {
332     PORTAL_AUTHENTICATION_FILE_LOCATION = pORTAL_AUTHENTICATION_FILE_LOCATION;
333   }
334
335   /**
336    * @return the tEST_CONFIG_FILE
337    */
338   public static String getTEST_CONFIG_FILE() {
339     return TEST_CONFIG_FILE;
340   }
341
342   /**
343    * @param tEST_CONFIG_FILE the tEST_CONFIG_FILE to set
344    */
345   public static void setTEST_CONFIG_FILE(String tEST_CONFIG_FILE) {
346     TEST_CONFIG_FILE = tEST_CONFIG_FILE;
347   }
348
349   /**
350    * @return the uRI_ATTR_NAME
351    */
352   public static String getURI_ATTR_NAME() {
353     return URI_ATTR_NAME;
354   }
355
356   /**
357    * @param uRI_ATTR_NAME the uRI_ATTR_NAME to set
358    */
359   public static void setURI_ATTR_NAME(String uRI_ATTR_NAME) {
360     URI_ATTR_NAME = uRI_ATTR_NAME;
361   }
362
363   /**
364    * @return the filesep
365    */
366   public static String getFilesep() {
367     return FILESEP;
368   }
369
370   /**
371    * @return the esSuggestApi
372    */
373   public static String getEsSuggestApi() {
374     return ES_SUGGEST_API;
375   }
376
377   /**
378    * @return the esCountApi
379    */
380   public static String getEsCountApi() {
381     return ES_COUNT_API;
382   }
383
384   /**
385    * @return the esSearchApi
386    */
387   public static String getEsSearchApi() {
388     return ES_SEARCH_API;
389   }
390
391   /**
392    * @return the entityAutoSuggestIndexNameDefault
393    */
394   public static String getEntityAutoSuggestIndexNameDefault() {
395     return ENTITY_AUTO_SUGGEST_INDEX_NAME_DEFAULT;
396   }
397
398   /**
399    * @return the entityAutoSuggestSettingsFileDefault
400    */
401   public static String getEntityAutoSuggestSettingsFileDefault() {
402     return ENTITY_AUTO_SUGGEST_SETTINGS_FILE_DEFAULT;
403   }
404
405   /**
406    * @return the entityAutoSuggestMappingsFileDefault
407    */
408   public static String getEntityAutoSuggestMappingsFileDefault() {
409     return ENTITY_AUTO_SUGGEST_MAPPINGS_FILE_DEFAULT;
410   }
411
412   /**
413    * @return the entityDynamicMappingsFileDefault
414    */
415   public static String getEntityDynamicMappingsFileDefault() {
416     return ENTITY_DYNAMIC_MAPPINGS_FILE_DEFAULT;
417   }
418
419   /**
420    * @return the uriVersionRegexPattern
421    */
422   public static String getUriVersionRegexPattern() {
423     return URI_VERSION_REGEX_PATTERN;
424   }
425
426 }