Package org.keycloak.validation
Class DefaultValidationContext<T>
- java.lang.Object
-
- org.keycloak.validation.DefaultValidationContext<T>
-
- All Implemented Interfaces:
ValidationContext<T>
- Direct Known Subclasses:
ClientValidationContext
public abstract class DefaultValidationContext<T> extends Object implements ValidationContext<T>
- Author:
- Vaclav Muzikar
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.validation.ValidationContext
ValidationContext.Event
-
-
Constructor Summary
Constructors Constructor Description DefaultValidationContext(ValidationContext.Event event, KeycloakSession session, T objectToValidate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValidationContext<T>
addError(String message)
ValidationContext<T>
addError(String fieldId, String message)
ValidationContext<T>
addError(String fieldId, String message, String localizedMessageKey, Object... localizedMessageParams)
ValidationContext.Event
getEvent()
T
getObjectToValidate()
KeycloakSession
getSession()
ValidationResult
toResult()
-
-
-
Constructor Detail
-
DefaultValidationContext
public DefaultValidationContext(ValidationContext.Event event, KeycloakSession session, T objectToValidate)
-
-
Method Detail
-
getEvent
public ValidationContext.Event getEvent()
- Specified by:
getEvent
in interfaceValidationContext<T>
-
getSession
public KeycloakSession getSession()
- Specified by:
getSession
in interfaceValidationContext<T>
-
getObjectToValidate
public T getObjectToValidate()
- Specified by:
getObjectToValidate
in interfaceValidationContext<T>
-
addError
public ValidationContext<T> addError(String message)
- Specified by:
addError
in interfaceValidationContext<T>
-
addError
public ValidationContext<T> addError(String fieldId, String message)
- Specified by:
addError
in interfaceValidationContext<T>
-
addError
public ValidationContext<T> addError(String fieldId, String message, String localizedMessageKey, Object... localizedMessageParams)
- Specified by:
addError
in interfaceValidationContext<T>
-
toResult
public ValidationResult toResult()
- Specified by:
toResult
in interfaceValidationContext<T>
-
-