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 classValidationException.Error
-
Constructor Summary
Constructors Constructor Description ValidationException()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(ValidationError error)List<ValidationException.Error>getErrors()StringgetMessage()javax.ws.rs.core.Response.StatusgetStatusCode()booleanhasError(String... types)booleanisAttributeOnError(String... name)Checks if there are validation errors related to the attribute with the givenname.StringtoString()-
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:
acceptin interfaceConsumer<ValidationError>
-
getMessage
public String getMessage()
- Overrides:
getMessagein classThrowable
-
getStatusCode
public javax.ws.rs.core.Response.Status getStatusCode()
-
-