Package org.keycloak.validate
Class ValidatorConfig
java.lang.Object
org.keycloak.validate.ValidatorConfig
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionValidatorConfig(Map<String, Object> config) Creates a newValidatorConfigfrom the givenmap. -
Method Summary
Modifier and TypeMethodDescriptionasMap()builder()static ValidatorConfigconfigFromMap(Map<String, Object> map) Static helper to create aValidatorConfigfrom the givenmap.booleancontainsKey(String key) getBoolean(String key) getBooleanOrDefault(String key, Boolean defaultValue) getDoubleOrDefault(String key, Double defaultValue) getIntOrDefault(String key, Integer defaultValue) getLongOrDefault(String key, Long defaultValue) getOrDefault(String key, Object defaultValue) getPattern(String key) Get regex Pattern from the configuration.getPatternOrDefault(String key, Pattern defaultValue) getStringListOrDefault(String key, List<String> defaultValue) getStringOrDefault(String key, String defaultValue) getStringSet(String key) getStringSetOrDefault(String key, Set<String> defaultValue) booleanisEmpty()static booleanisEmpty(ValidatorConfig config) intsize()toString()
-
Field Details
-
EMPTY
An emptyValidatorConfig.
-
-
Constructor Details
-
ValidatorConfig
Creates a newValidatorConfigfrom the givenmap.- Parameters:
config-
-
-
Method Details
-
isEmpty
-
configFromMap
Static helper to create aValidatorConfigfrom the givenmap.- Parameters:
map-- Returns:
-
asMap
-
containsKey
-
size
public int size() -
isEmpty
public boolean isEmpty() -
get
-
getOrDefault
-
getString
-
getStringOrDefault
-
getInt
-
getIntOrDefault
-
getLong
-
getLongOrDefault
-
getDouble
-
getDoubleOrDefault
-
getBoolean
-
getBooleanOrDefault
-
getStringSet
-
getStringSetOrDefault
-
getStringListOrDefault
-
getStringListOrDefault
-
getPattern
Get regex Pattern from the configuration. String can be used and it is compiled into Pattern.- Parameters:
key- to get- Returns:
- Pattern or null
-
getPatternOrDefault
-
builder
-
toString
-