Package org.keycloak.validate
Class ValidatorConfig
java.lang.Object
org.keycloak.validate.ValidatorConfig
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionValidatorConfig
(Map<String, Object> config) Creates a newValidatorConfig
from the givenmap
. -
Method Summary
Modifier and TypeMethodDescriptionasMap()
builder()
static ValidatorConfig
configFromMap
(Map<String, Object> map) Static helper to create aValidatorConfig
from the givenmap
.boolean
containsKey
(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) boolean
isEmpty()
int
size()
toString()
-
Field Details
-
EMPTY
An emptyValidatorConfig
.
-
-
Constructor Details
-
ValidatorConfig
Creates a newValidatorConfig
from the givenmap
.- Parameters:
config
-
-
-
Method Details
-
configFromMap
Static helper to create aValidatorConfig
from 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
-