Package org.keycloak.userprofile
Class AttributeValidatorMetadata
- java.lang.Object
-
- org.keycloak.userprofile.AttributeValidatorMetadata
-
public final class AttributeValidatorMetadata extends Object
- Author:
- Pedro Igor, Vlastimil Elias
-
-
Constructor Summary
Constructors Constructor Description AttributeValidatorMetadata(String validatorId)
AttributeValidatorMetadata(String validatorId, ValidatorConfig validatorConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Map<String,Object>
getValidatorConfig()
Get validator configuration as map.String
getValidatorId()
Getters so we can collect validation configurations and provide them to GUI for dynamic client side validations.int
hashCode()
ValidationContext
validate(AttributeContext context)
Run validation for given AttributeContext.
-
-
-
Constructor Detail
-
AttributeValidatorMetadata
public AttributeValidatorMetadata(String validatorId)
-
AttributeValidatorMetadata
public AttributeValidatorMetadata(String validatorId, ValidatorConfig validatorConfig)
-
-
Method Detail
-
getValidatorId
public String getValidatorId()
Getters so we can collect validation configurations and provide them to GUI for dynamic client side validations.- Returns:
- the validatorId
-
getValidatorConfig
public Map<String,Object> getValidatorConfig()
Get validator configuration as map.- Returns:
- never null
-
validate
public ValidationContext validate(AttributeContext context)
Run validation for given AttributeContext.- Parameters:
context
- to validate- Returns:
- context containing errors if any found
-
-