Class SystemProp<T>
java.lang.Object
com.inductiveautomation.ignition.common.SystemProp<T>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SystemProp<Boolean>forBoolean(String key, @Nullable String migrationKey, String descriptionKey) static SystemProp<Boolean>forBoolean(String key, @Nullable String migrationKey, String descriptionKey, @Nullable Boolean defaultValue) static SystemProp<Boolean>forBoolean(String key, String descriptionKey) static SystemProp<Double>static SystemProp<Double>forDouble(String key, @Nullable String migrationKey, String descriptionKey, @Nullable Double defaultValue) static SystemProp<Double>static SystemProp<Float>static SystemProp<Float>forFloat(String key, @Nullable String migrationKey, String descriptionKey, @Nullable Float defaultValue) static SystemProp<Float>static SystemProp<Integer>forInteger(String key, @Nullable String migrationKey, String descriptionKey) static SystemProp<Integer>forInteger(String key, @Nullable String migrationKey, String descriptionKey, @Nullable Integer defaultValue) static SystemProp<Integer>forInteger(String key, String descriptionKey) static SystemProp<Long>static SystemProp<Long>forLong(String key, @Nullable String migrationKey, String descriptionKey, @Nullable Long defaultValue) static SystemProp<Long>static SystemProp<String>static SystemProp<String>forString(String key, @Nullable String migrationKey, String descriptionKey, @Nullable String defaultValue) static SystemProp<String>getKey()abstract TgetValue()Safe call.Unsafe call.
-
Field Details
-
key
-
descriptionKey
-
defaultValue
-
-
Constructor Details
-
SystemProp
-
-
Method Details
-
getKey
-
getValue
Safe call. Retrieves the property value if not null, otherwise the default value. If both are null, the following fallback values are returned for known types:- String - an empty string
- Boolean - false
- Integer, Long, Double, Float - 0
NumberFormatException -
getValueOrNull
Unsafe call. The retrieval order for nullable values is as follows:
- using the primary key
- fall back to the migration key
- fall back to the default value if non-null
- and finally to null.
NumberFormatExceptionif the runtime cannot be parsed. -
forString
-
forString
public static SystemProp<String> forString(String key, @Nullable @Nullable String migrationKey, String descriptionKey) -
forString
-
forBoolean
-
forBoolean
public static SystemProp<Boolean> forBoolean(String key, @Nullable @Nullable String migrationKey, String descriptionKey) -
forBoolean
-
forInteger
-
forInteger
public static SystemProp<Integer> forInteger(String key, @Nullable @Nullable String migrationKey, String descriptionKey) -
forInteger
-
forLong
-
forLong
public static SystemProp<Long> forLong(String key, @Nullable @Nullable String migrationKey, String descriptionKey) -
forLong
-
forFloat
-
forFloat
public static SystemProp<Float> forFloat(String key, @Nullable @Nullable String migrationKey, String descriptionKey) -
forFloat
-
forDouble
-
forDouble
public static SystemProp<Double> forDouble(String key, @Nullable @Nullable String migrationKey, String descriptionKey) -
forDouble
-