Package com.ibm.fhir.config
Class SystemConfigHelper
- java.lang.Object
-
- com.ibm.fhir.config.SystemConfigHelper
-
public class SystemConfigHelper extends java.lang.Object
Helper to read system level properties (not from fhir-server-config)
-
-
Constructor Summary
Constructors Constructor Description SystemConfigHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
convertToSeconds(java.lang.String duration)
Convert the given duration into the equivalent number of seconds.static long
getDurationFromEnv(java.lang.String envVariable, java.lang.String defaultValue)
Get the value of the environment variable and convert to number of seconds
-
-
-
Method Detail
-
convertToSeconds
public static long convertToSeconds(java.lang.String duration)
Convert the given duration into the equivalent number of seconds. A duration can be specified as a combination of second, minute and hour values. For example: 86400s 1440m 24h 1439m60s 23h3600s 23h59m60s etc.- Parameters:
duration
-- Returns:
-
getDurationFromEnv
public static long getDurationFromEnv(java.lang.String envVariable, java.lang.String defaultValue)
Get the value of the environment variable and convert to number of seconds- Parameters:
envVariable
-- Returns:
-
-