changed the header license to new license
[aai/sparky-be.git] / src / main / java / org / onap / aai / sparky / viewandinspect / config / SparkyConstants.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017-2018 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 package org.onap.aai.sparky.viewandinspect.config;
22
23 /**
24  * The Class TierSupportUiConstants.
25  */
26 public class SparkyConstants {
27
28   public static String APP_NAME = "AAIUI";
29
30   /** Default to unix file separator if system property file.separator is null */
31   public static final String FILESEP =
32       (System.getProperty("file.separator") == null) ? "/" : System.getProperty("file.separator");
33
34   public static String CONFIG_HOME = System.getProperty("CONFIG_HOME") + FILESEP;
35   public static String AJSC_HOME = System.getProperty("AJSC_HOME") + FILESEP;
36   public static String CONFIG_ROOT_LOCATION = AJSC_HOME + "bundleconfig" + FILESEP + "etc" + FILESEP;
37   public static String STATIC_CONFIG_APP_LOCATION = CONFIG_ROOT_LOCATION + "appprops" + FILESEP;
38   public static String DYNAMIC_CONFIG_APP_LOCATION = CONFIG_HOME;
39
40   public static String CONFIG_OXM_LOCATION = CONFIG_HOME + "model" + FILESEP;
41   public static String CONFIG_FILTERS_BASE_LOCATION = CONFIG_HOME + FILESEP;
42   public static String CONFIG_AUTH_LOCATION = CONFIG_HOME + "auth" + FILESEP;
43
44   public static String HOST = "host";
45   public static String IP_ADDRESS = "ipAddress";
46   public static String PORT = "port";
47   public static String HTTP_PORT = "httpPort";
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 AUTHORIZED_USERS_FILE_LOCATION = DYNAMIC_CONFIG_APP_LOCATION + "authorized-users.config";
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 = DYNAMIC_CONFIG_APP_LOCATION + "portal" + FILESEP + "portal-authentication.properties";
56   
57   // Related to data-router properties
58   public static String DR_URI_SUFFIX = "uriSuffix";
59   public static String DR_CERT_NAME = "cert-name";
60   public static String DR_KEYSTORE_PASSWORD = "keystore-password";
61   public static String DR_KEYSTORE = "keystore";
62   public static String DR_CONNECT_TIMEOUT = "connectTimeoutMs";
63   public static String DR_READ_TIMEOUT = "readTimeoutMs";
64   
65   public static final String APP_JSON = "application/json";
66   
67   public static final String ES_SUGGEST_API = "_suggest";
68   public static final String ES_COUNT_API = "_count";
69   public static final String ES_SEARCH_API = "_search";
70   
71   public static final String UI_FILTER_VIEW_NAME_PARAMETER = "viewName";
72   public static final String UI_FILTER_ID_LIST_PARAMETER = "filterIdList";
73   
74   public static final String ENTITY_AUTO_SUGGEST_INDEX_NAME_DEFAULT = 
75       "entityautosuggestindex-localhost";
76   public static final String ENTITY_AUTO_SUGGEST_SETTINGS_FILE_DEFAULT =
77       "/etc/autoSuggestSettings.json";
78   public static final String ENTITY_AUTO_SUGGEST_MAPPINGS_FILE_DEFAULT =
79       "/etc/autoSuggestMappings.json";
80   public static final String ENTITY_DYNAMIC_MAPPINGS_FILE_DEFAULT =
81       "/etc/dynamicMappings.json";
82   public static final String FILTER_LIST_FILE_DEFAULT =
83       CONFIG_FILTERS_BASE_LOCATION + "filters" + FILESEP + "aaiui_filters.json";
84   public static final String FILTER_MAPPING_FILE_DEFAULT =
85       CONFIG_FILTERS_BASE_LOCATION + "filters" + FILESEP + "aaiui_views.json";
86   
87   public static final String SUBSCRIPTION_OI_MAPPING =
88       CONFIG_FILTERS_BASE_LOCATION + "subscription_object_inspector_mapping.json";
89   
90   public static final String SUGGESTION_TEXT_SEPARATOR = " -- ";
91
92   // Injected Attributes
93   public static String URI_ATTR_NAME = "uri";
94
95   public static final String URI_VERSION_REGEX_PATTERN = "aai/v[\\d]+/";
96   
97   public static final String getConfigPath(String configFile){
98     return AJSC_HOME + FILESEP + configFile;
99   }
100
101 }