mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-25 19:55:48 +01:00
Remove deprecated ConfigConstants (#1659)
Related to #1408 Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
parent
289ad31afd
commit
fabf6808ec
@ -1,76 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2010-2020 Contributors to the openHAB project
|
||||
*
|
||||
* See the NOTICE file(s) distributed with this work for additional
|
||||
* information.
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License 2.0 which is available at
|
||||
* http://www.eclipse.org/legal/epl-2.0
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.core.config.core;
|
||||
|
||||
import org.openhab.core.OpenHAB;
|
||||
|
||||
/**
|
||||
* This class provides constants relevant for the configuration of openHAB
|
||||
*
|
||||
* @deprecated Use {@link OpenHAB} instead.
|
||||
*
|
||||
* @author Kai Kreuzer - Initial contribution
|
||||
*/
|
||||
@Deprecated
|
||||
public class ConfigConstants {
|
||||
|
||||
/** The program argument name for setting the user data directory path */
|
||||
public static final String USERDATA_DIR_PROG_ARGUMENT = "openhab.userdata";
|
||||
|
||||
/** The program argument name for setting the main config directory path */
|
||||
public static final String CONFIG_DIR_PROG_ARGUMENT = "openhab.conf";
|
||||
|
||||
/** The default main configuration directory name */
|
||||
public static final String DEFAULT_CONFIG_FOLDER = "conf";
|
||||
|
||||
/** The default user data directory name */
|
||||
public static final String DEFAULT_USERDATA_FOLDER = "userdata";
|
||||
|
||||
/** The property to recognize a service instance created by a service factory */
|
||||
public static final String SERVICE_CONTEXT = "openhab.servicecontext";
|
||||
|
||||
/** The property to separate service PIDs from their contexts */
|
||||
public static final String SERVICE_CONTEXT_MARKER = "#";
|
||||
|
||||
/**
|
||||
* Returns the configuration folder path name. The main config folder <code><smarthome>/config</code> can be
|
||||
* overwritten by setting
|
||||
* the System property <code>smarthome.configdir</code>.
|
||||
*
|
||||
* @return the configuration folder path name
|
||||
*/
|
||||
public static String getConfigFolder() {
|
||||
String progArg = System.getProperty(CONFIG_DIR_PROG_ARGUMENT);
|
||||
if (progArg != null) {
|
||||
return progArg;
|
||||
} else {
|
||||
return DEFAULT_CONFIG_FOLDER;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the user data folder path name. The main user data folder <code><smarthome>/userdata</code> can be
|
||||
* overwritten by setting
|
||||
* the System property <code>smarthome.userdata</code>.
|
||||
*
|
||||
* @return the user data folder path name
|
||||
*/
|
||||
public static String getUserDataFolder() {
|
||||
String progArg = System.getProperty(USERDATA_DIR_PROG_ARGUMENT);
|
||||
if (progArg != null) {
|
||||
return progArg;
|
||||
} else {
|
||||
return DEFAULT_USERDATA_FOLDER;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user