public final class ValidationException extends RuntimeException implements Consumer<ValidationError>
Modifier and Type | Class and Description |
---|---|
static class |
ValidationException.Error |
Constructor and Description |
---|
ValidationException(KeycloakSession session,
UserModel user) |
Modifier and Type | Method and Description |
---|---|
void |
accept(ValidationError error) |
List<ValidationException.Error> |
getErrors() |
String |
getMessage() |
javax.ws.rs.core.Response.Status |
getStatusCode() |
boolean |
hasError(String... types) |
boolean |
isAttributeOnError(String... name)
Checks if there are validation errors related to the attribute with the given
name . |
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public ValidationException(KeycloakSession session, UserModel user)
public List<ValidationException.Error> getErrors()
public boolean hasError(String... types)
public boolean isAttributeOnError(String... name)
name
.name
- public void accept(ValidationError error)
accept
in interface Consumer<ValidationError>
public String getMessage()
getMessage
in class Throwable
public javax.ws.rs.core.Response.Status getStatusCode()
Copyright © 2021 JBoss by Red Hat. All rights reserved.