Package org.keycloak.validate
Class ValidatorConfig
- java.lang.Object
-
- org.keycloak.validate.ValidatorConfig
-
public class ValidatorConfig extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classValidatorConfig.ValidatorConfigBuilder
-
Field Summary
Fields Modifier and Type Field Description static ValidatorConfigEMPTYAn emptyValidatorConfig.
-
Constructor Summary
Constructors Constructor Description ValidatorConfig(Map<String,Object> config)Creates a newValidatorConfigfrom the givenmap.
-
Method Summary
-
-
-
Field Detail
-
EMPTY
public static final ValidatorConfig EMPTY
An emptyValidatorConfig.
-
-
Constructor Detail
-
ValidatorConfig
public ValidatorConfig(Map<String,Object> config)
Creates a newValidatorConfigfrom the givenmap.- Parameters:
config-
-
-
Method Detail
-
configFromMap
public static ValidatorConfig configFromMap(Map<String,Object> map)
Static helper to create aValidatorConfigfrom the givenmap.- Parameters:
map-- Returns:
-
containsKey
public boolean containsKey(String key)
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
getStringSetOrDefault
public Set<String> getStringSetOrDefault(String key, Set<String> defaultValue)
-
getStringListOrDefault
public List<String> getStringListOrDefault(String key, List<String> defaultValue)
-
getPattern
public Pattern getPattern(String key)
Get regex Pattern from the configuration. String can be used and it is compiled into Pattern.- Parameters:
key- to get- Returns:
- Pattern or null
-
builder
public static ValidatorConfig.ValidatorConfigBuilder builder()
-
-