Convert Sparky to Spring-Boot
[aai/sparky-be.git] / sparkybe-onap-service / src / main / java / org / onap / aai / sparky / viewandinspect / config / TierSupportUiConstants.java
1 /**
2  * ============LICENSE_START===================================================
3  * SPARKY (AAI UI service)
4  * ============================================================================
5  * Copyright © 2017 AT&T Intellectual Property.
6  * Copyright © 2017 Amdocs
7  * All rights reserved.
8  * ============================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * ============LICENSE_END=====================================================
21  *
22  * ECOMP and OpenECOMP are trademarks
23  * and service marks of AT&T Intellectual Property.
24  */
25 package org.onap.aai.sparky.viewandinspect.config;
26
27 /**
28  * The Class TierSupportUiConstants.
29  */
30 public class TierSupportUiConstants {
31
32   public static String APP_NAME = "AAIUI";
33
34   /** Default to unix file separator if system property file.separator is null */
35   public static final String FILESEP =
36       (System.getProperty("file.separator") == null) ? "/" : System.getProperty("file.separator");
37
38   public static String CONFIG_HOME = System.getProperty("CONFIG_HOME") + FILESEP;
39   public static String AJSC_HOME = System.getProperty("AJSC_HOME") + FILESEP;
40   public static String CONFIG_ROOT_LOCATION =
41       AJSC_HOME + "bundleconfig" + FILESEP + "etc" + FILESEP;
42   public static String STATIC_CONFIG_APP_LOCATION = CONFIG_ROOT_LOCATION + "appprops" + FILESEP;
43   public static String DYNAMIC_CONFIG_APP_LOCATION = CONFIG_HOME;
44
45   public static String CONFIG_OXM_LOCATION = CONFIG_HOME + "model" + FILESEP;
46   public static String CONFIG_FILTERS_BASE_LOCATION = CONFIG_HOME + FILESEP;
47   public static String CONFIG_AUTH_LOCATION = CONFIG_HOME + "auth" + FILESEP;
48
49   public static String HOST = "host";
50   public static String IP_ADDRESS = "ipAddress";
51   public static String PORT = "port";
52   public static String HTTP_PORT = "httpPort";
53   public static String RETRIES = "numRequestRetries";
54   public static String RESOURCE_VERSION = "resource-version";
55   public static String URI = "URI";
56
57   public static String AUTHORIZED_USERS_FILE_LOCATION =
58       DYNAMIC_CONFIG_APP_LOCATION + "authorized-users.config";
59   public static String USERS_FILE_LOCATION = DYNAMIC_CONFIG_APP_LOCATION + "users.config";
60   public static String ROLES_FILE_LOCATION = DYNAMIC_CONFIG_APP_LOCATION + "roles.config";
61   public static String PORTAL_AUTHENTICATION_FILE_LOCATION =
62       DYNAMIC_CONFIG_APP_LOCATION + "portal" + FILESEP + "portal-authentication.properties";
63
64   // Related to data-router properties
65   public static String DR_URI_SUFFIX = "uriSuffix";
66   public static String DR_CERT_NAME = "cert-name";
67   public static String DR_KEYSTORE_PASSWORD = "keystore-password";
68   public static String DR_KEYSTORE = "keystore";
69   public static String DR_CONNECT_TIMEOUT = "connectTimeoutMs";
70   public static String DR_READ_TIMEOUT = "readTimeoutMs";
71
72   public static final String ES_SUGGEST_API = "_suggest";
73   public static final String ES_COUNT_API = "_count";
74   public static final String ES_SEARCH_API = "_search";
75
76   public static final String UI_FILTER_VIEW_NAME_PARAMETER = "viewName";
77   public static final String UI_FILTER_ID_LIST_PARAMETER = "filterIdList";
78
79   public static final String ENTITY_AUTO_SUGGEST_INDEX_NAME_DEFAULT =
80       "entityautosuggestindex-localhost";
81   public static final String ENTITY_AUTO_SUGGEST_SETTINGS_FILE_DEFAULT =
82       "/etc/autoSuggestSettings.json";
83   public static final String ENTITY_AUTO_SUGGEST_MAPPINGS_FILE_DEFAULT =
84       "/etc/autoSuggestMappings.json";
85   public static final String ENTITY_DYNAMIC_MAPPINGS_FILE_DEFAULT = "/etc/dynamicMappings.json";
86   public static final String FILTER_LIST_FILE_DEFAULT =
87       CONFIG_FILTERS_BASE_LOCATION + "filters" + FILESEP + "aaiui_filters.json";
88   public static final String FILTER_MAPPING_FILE_DEFAULT =
89       CONFIG_FILTERS_BASE_LOCATION + "filters" + FILESEP + "aaiui_views.json";
90
91   public static final String SUGGESTION_TEXT_SEPARATOR = " -- ";
92
93   // Injected Attributes
94   public static String URI_ATTR_NAME = "uri";
95
96   public static final String URI_VERSION_REGEX_PATTERN = "aai/v[\\d]+/";
97
98   public static final String getConfigPath(String configFile) {
99     return AJSC_HOME + FILESEP + configFile;
100   }
101
102 }