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 class
ValidatorConfig.ValidatorConfigBuilder
-
Field Summary
Fields Modifier and Type Field Description static ValidatorConfig
EMPTY
An emptyValidatorConfig
.
-
Constructor Summary
Constructors Constructor Description ValidatorConfig(Map<String,Object> config)
Creates a newValidatorConfig
from 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 newValidatorConfig
from the givenmap
.- Parameters:
config
-
-
-
Method Detail
-
configFromMap
public static ValidatorConfig configFromMap(Map<String,Object> map)
Static helper to create aValidatorConfig
from 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()
-
-