Package org.opennms.core.sysprops
Class SystemProperties
- java.lang.Object
-
- org.opennms.core.sysprops.SystemProperties
-
public class SystemProperties extends java.lang.Object
Utility to extract system properties, similar to Integer.getInteger. This class allows to distinguish between a none present value and a malformed value. In case of the latter a log message is produced. Integer.getInteger would just return the defaultValue without informing the user and can therefor lead to hard to find configuration problems.
-
-
Constructor Summary
Constructors Constructor Description SystemProperties()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Boolean
getBooleanWithDefaultAsTrue(java.lang.String name)
static java.lang.Integer
getInteger(java.lang.String propertyName)
static java.lang.Integer
getInteger(java.lang.String propertyName, int defaultValue)
static java.lang.Integer
getInteger(java.lang.String propertyName, java.lang.Integer defaultValue)
static java.lang.Long
getLong(java.lang.String propertyName)
static java.lang.Long
getLong(java.lang.String propertyName, int defaultValue)
static java.lang.Long
getLong(java.lang.String propertyName, java.lang.Long defaultValue)
-
-
-
Method Detail
-
getLong
public static java.lang.Long getLong(java.lang.String propertyName)
-
getLong
public static java.lang.Long getLong(java.lang.String propertyName, int defaultValue)
-
getLong
public static java.lang.Long getLong(java.lang.String propertyName, java.lang.Long defaultValue)
-
getInteger
public static java.lang.Integer getInteger(java.lang.String propertyName)
-
getInteger
public static java.lang.Integer getInteger(java.lang.String propertyName, int defaultValue)
-
getInteger
public static java.lang.Integer getInteger(java.lang.String propertyName, java.lang.Integer defaultValue)
-
getBooleanWithDefaultAsTrue
public static java.lang.Boolean getBooleanWithDefaultAsTrue(java.lang.String name)
-
-