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
FieldsModifier and TypeFieldDescriptionstatic final Stringthe service pid used for the definition of the base package and add-onsstatic final Stringthe configuration parameter name used for the base packagestatic final StringThe program argument name for setting the main config directory pathstatic final StringThe default main configuration directory namestatic final StringThe default runtime directory namestatic final StringThe default user data directory namestatic final StringThe program argument name for setting the runtime directory pathstatic final StringThe property to recognize a service instance created by a service factorystatic final StringThe property to separate service PIDs from their contextsstatic final StringThe program argument name for setting the user data directory path -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringProvides the build number as it can be found in the version.properties file.static StringReturns the configuration folder path name.static StringReturns the runtime folder path name.static StringReturns the user data folder path name.static StringReturns 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 configuration 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>/runtimecan 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>/confcan 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>/userdatacan be overwritten by setting the System propertyopenhab.userdata.- Returns:
- the user data folder path name
-