Class ConfigUtil
- java.lang.Object
-
- org.forgerock.selfservice.core.util.ConfigUtil
-
public final class ConfigUtil extends Object
Utility methods for config value retrieval.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getConfigField(String fieldName, JsonValue config, int defaultValue)
Retrieve an integer config value with a default if the value is absent.static String
getConfigField(String fieldName, JsonValue config, String defaultValue)
Retrieve a String config value with a default if the value is absent.
-
-
-
Method Detail
-
getConfigField
public static String getConfigField(String fieldName, JsonValue config, String defaultValue)
Retrieve a String config value with a default if the value is absent.- Parameters:
fieldName
- the name of the config value to returnconfig
- the config potentially containing the config valuedefaultValue
- the default to return if the value is absent- Returns:
- the config value or the default value
-
getConfigField
public static int getConfigField(String fieldName, JsonValue config, int defaultValue)
Retrieve an integer config value with a default if the value is absent.- Parameters:
fieldName
- the name of the config value to returnconfig
- the config potentially containing the config valuedefaultValue
- the default to return if the value is absent- Returns:
- the config value or the default value
-
-