Package org.opennms.core.utils
Class SystemInfoUtils
- java.lang.Object
-
- org.opennms.core.utils.SystemInfoUtils
-
public class SystemInfoUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_INSTANCE_ID
static java.lang.String
OPENNMS_INSTANCE_ID_SYS_PROP
-
Constructor Summary
Constructors Constructor Description SystemInfoUtils()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDisplayVersion()
Retrieves the displaying version of the current system i.e: 17.0.0 2015.1.1 This is typically equal to the string returned by getVersion(), but may differ.static java.lang.String
getInstanceId()
Retrieves the instance id of the current system.java.lang.String
getPackageDescription()
Retrieves the package description of the current system i.e: OpenNMS OpenNMS Meridianjava.lang.String
getPackageName()
Retrieves the package name of the current system i.e: opennms meridianjava.lang.String
getVersion()
Retrieves the version of the current system i.e: 17.0.0 2015.1.1
-
-
-
Field Detail
-
OPENNMS_INSTANCE_ID_SYS_PROP
public static final java.lang.String OPENNMS_INSTANCE_ID_SYS_PROP
- See Also:
- Constant Field Values
-
DEFAULT_INSTANCE_ID
public static final java.lang.String DEFAULT_INSTANCE_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstanceId
public static java.lang.String getInstanceId()
Retrieves the instance id of the current system. This value is used to identify OpenNMS instances in environments where multiple systems share the same infrastructure. Defaults to "OpenNMS", but can be altered by setting the "org.opennms.instance.id" system property.- Returns:
- instance id string
-
getVersion
public java.lang.String getVersion()
Retrieves the version of the current system i.e:- 17.0.0
- 2015.1.1
- Returns:
- version string
-
getDisplayVersion
public java.lang.String getDisplayVersion()
Retrieves the displaying version of the current system i.e:- 17.0.0
- 2015.1.1
- Returns:
- display version string
-
getPackageName
public java.lang.String getPackageName()
Retrieves the package name of the current system i.e:- opennms
- meridian
- Returns:
- package name
-
getPackageDescription
public java.lang.String getPackageDescription()
Retrieves the package description of the current system i.e:- OpenNMS
- OpenNMS Meridian
- Returns:
- package name
-
-