Class ValidationAppException
java.lang.Object
java.lang.Throwable
java.lang.Exception
jp.ecuacion.lib.core.exception.checked.AppException
jp.ecuacion.lib.core.exception.checked.SingleAppException
jp.ecuacion.lib.core.exception.checked.ValidationAppException
- All Implemented Interfaces:
Serializable
Holds a Jakarta Validations violation.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionValidationAppException(jakarta.validation.ConstraintViolation<?> violation) Constructs a new instance with Jakarta Validation violation.Constructs a new instance withBeanValidationErrorInfoBean. -
Method Summary
Modifier and TypeMethodDescriptionGets BeanValidationErrorInfoBean.String[]Provides the location of an item at which this error occured.SetsmessagePostfixand returns this for method chain.booleanObtainsisMessageWithItemName.voidsetMessagePostfix(PropertyFileUtil.Arg messagePostfix) setMessagePrefix(PropertyFileUtil.Arg messagePrefix) SetsmessagePrefixand returns this for method chain.setMessageWithItemName(boolean isMessageWithItemName) SetsisMessageWithItemNameand returns this for method chain.toString()Outputs a string for logs.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ValidationAppException
Constructs a new instance with Jakarta Validation violation.- Parameters:
violation- violation result
-
ValidationAppException
Constructs a new instance withBeanValidationErrorInfoBean.This makes possible to treat exceptions wchich are not created from
ConstraintViolationasBeanValidationAppException.- Parameters:
bean- BeanValidationErrorInfoBean
-
-
Method Details
-
getConstraintViolationBean
Gets BeanValidationErrorInfoBean.- Returns:
- BeanValidationErrorInfoBean
-
getMessage
- Overrides:
getMessagein classThrowable
-
toString
-
isMessageWithItemName
public boolean isMessageWithItemName()ObtainsisMessageWithItemName.- Returns:
- boolean
-
setMessageWithItemName
SetsisMessageWithItemNameand returns this for method chain.- Returns:
- BeanValidationErrorInfoBean;
-
getMessagePrefix
-
setMessagePrefix
SetsmessagePrefixand returns this for method chain.- Returns:
- BeanValidationErrorInfoBean;
-
getMessagePostfix
SetsmessagePostfixand returns this for method chain.- Returns:
- BeanValidationErrorInfoBean;
-
setMessagePostfix
-
getItemPropertyPaths
Description copied from class:SingleAppExceptionProvides the location of an item at which this error occured.- Specified by:
getItemPropertyPathsin classSingleAppException- Returns:
- an array of fpropertyPath
-