Package org.openhab.core
Class OpenHAB
java.lang.Object
org.openhab.core.OpenHAB
Some core static methods that provide information about the running openHAB instance.
- Author:
- Kai Kreuzer - Initial contribution
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
the service pid used for the definition of the base package and add-onsstatic final String
the configuraton parameter name used for the base packagestatic final String
The program argument name for setting the main config directory pathstatic final String
The default main configuration directory namestatic final String
The default runtime directory namestatic final String
The default user data directory namestatic final String
The program argument name for setting the runtime directory pathstatic final String
The property to recognize a service instance created by a service factorystatic final String
The property to separate service PIDs from their contextsstatic final String
The program argument name for setting the user data directory path -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Provides the build number as it can be found in the version.properties file.static String
Returns the configuration folder path name.static String
Returns the runtime folder path name.static String
Returns the user data folder path name.static String
Returns the current openHAB version, retrieving the information from the core bundle version.
-
Field Details
-
RUNTIME_DIR_PROG_ARGUMENT
The program argument name for setting the runtime directory path- See Also:
-
USERDATA_DIR_PROG_ARGUMENT
The program argument name for setting the user data directory path- See Also:
-
CONFIG_DIR_PROG_ARGUMENT
The program argument name for setting the main config directory path- See Also:
-
DEFAULT_RUNTIME_FOLDER
The default runtime directory name- See Also:
-
DEFAULT_CONFIG_FOLDER
The default main configuration directory name- See Also:
-
DEFAULT_USERDATA_FOLDER
The default user data directory name- See Also:
-
SERVICE_CONTEXT
The property to recognize a service instance created by a service factory- See Also:
-
SERVICE_CONTEXT_MARKER
The property to separate service PIDs from their contexts- See Also:
-
ADDONS_SERVICE_PID
the service pid used for the definition of the base package and add-ons- See Also:
-
CFG_PACKAGE
the configuraton parameter name used for the base package- See Also:
-
-
Constructor Details
-
OpenHAB
public OpenHAB()
-
-
Method Details
-
getVersion
Returns the current openHAB version, retrieving the information from the core bundle version.- Returns:
- the openHAB runtime version
-
buildString
Provides the build number as it can be found in the version.properties file.- Returns:
- The build string or "Unknown Build No." if none can be identified.
-
getRuntimeFolder
Returns the runtime folder path name. The runtime folder<openhab-home>/runtime
can be overwritten by setting the System propertyopenhab.runtime
.- Returns:
- the runtime folder path name
-
getConfigFolder
Returns the configuration folder path name. The main config folder<openhab-home>/conf
can be overwritten by setting the System propertyopenhab.conf
.- Returns:
- the configuration folder path name
-
getUserDataFolder
Returns the user data folder path name. The main user data folder<openhab-home>/userdata
can be overwritten by setting the System propertyopenhab.userdata
.- Returns:
- the user data folder path name
-