Initial search service commit
[aai/search-data-service.git] / src / main / java / org / openecomp / sa / searchdbabstraction / util / SearchDbConstants.java
1 /**
2  * ============LICENSE_START=======================================================
3  * Search Data 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 ati
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.openecomp.sa.searchdbabstraction.util;
26
27 public class SearchDbConstants {
28   public static final String SDB_FILESEP = (System.getProperty("file.separator") == null) ? "/"
29       : System.getProperty("file.separator");
30   public static final String SDB_BUNDLECONFIG_NAME =
31       (System.getProperty("BUNDLECONFIG_DIR") == null)
32           ? "bundleconfig" : System.getProperty("BUNDLECONFIG_DIR");
33
34   public static final String SDB_HOME_BUNDLECONFIG = (System.getProperty("AJSC_HOME") == null)
35       ? SDB_FILESEP + "opt" + SDB_FILESEP + "app" + SDB_FILESEP + "searchdb"
36         + SDB_FILESEP + SDB_BUNDLECONFIG_NAME
37       : System.getProperty("AJSC_HOME") + SDB_FILESEP + SDB_BUNDLECONFIG_NAME;
38
39   public static final String SDB_HOME_ETC =
40       SDB_HOME_BUNDLECONFIG + SDB_FILESEP + "etc" + SDB_FILESEP;
41   public static final String SDB_CONFIG_APP_LOCATION = SDB_HOME_ETC + "appprops" + SDB_FILESEP;
42
43   // Elastic Search related
44   public static final String SDB_SPECIFIC_CONFIG = (System.getProperty("CONFIG_HOME") == null)
45       ? SDB_CONFIG_APP_LOCATION : System.getProperty("CONFIG_HOME") + SDB_FILESEP;
46   public static final String ES_CONFIG_FILE = SDB_SPECIFIC_CONFIG + SDB_FILESEP
47       + "elastic-search.properties";
48   public static final String SDB_AUTH = SDB_SPECIFIC_CONFIG + "auth" + SDB_FILESEP;
49   public static final String SDB_AUTH_CONFIG_FILENAME = SDB_AUTH + "search_policy.json";
50   public static final String SDB_FILTER_CONFIG_FILE = SDB_SPECIFIC_CONFIG + "filter-config.json";
51   public static final String SDB_ANALYSIS_CONFIG_FILE =
52       SDB_SPECIFIC_CONFIG + "analysis-config.json";
53
54   // Logging related
55   public static final String SDB_SERVICE_NAME = "SearchDataService";
56 }