Package org.keycloak.userprofile
Class ValidationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.keycloak.userprofile.ValidationException
-
- All Implemented Interfaces:
Serializable
,Consumer<ValidationError>
public final class ValidationException extends RuntimeException implements Consumer<ValidationError>
- Author:
- Pedro Igor
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ValidationException.Error
-
Constructor Summary
Constructors Constructor Description ValidationException()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 givenname
.String
toString()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Method Detail
-
getErrors
public List<ValidationException.Error> getErrors()
-
hasError
public boolean hasError(String... types)
-
isAttributeOnError
public boolean isAttributeOnError(String... name)
Checks if there are validation errors related to the attribute with the givenname
.- Parameters:
name
-- Returns:
-
accept
public void accept(ValidationError error)
- Specified by:
accept
in interfaceConsumer<ValidationError>
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
getStatusCode
public javax.ws.rs.core.Response.Status getStatusCode()
-
-