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