@Component(value="ui_UniqueConstraintViolationHandler") public class UniqueConstraintViolationHandler extends java.lang.Object implements UiExceptionHandler, org.springframework.core.Ordered
UiExceptionHandler.UiContext
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
DEFAULT_MESSAGE_PROPERTY |
protected static java.lang.String |
MESSAGE_PREFIX |
protected io.jmix.core.Messages |
messages |
Constructor and Description |
---|
UniqueConstraintViolationHandler() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
doHandle(io.jmix.data.exception.UniqueConstraintViolationException exception,
UiExceptionHandler.UiContext context) |
protected java.lang.String |
getDefaultMessage(java.lang.String constraintName) |
protected java.lang.String |
getMessage(java.lang.String constraintName) |
int |
getOrder() |
boolean |
handle(java.lang.Throwable exception,
UiExceptionHandler.UiContext context)
Handle an exception.
|
protected static final java.lang.String DEFAULT_MESSAGE_PROPERTY
protected static final java.lang.String MESSAGE_PREFIX
@Autowired protected io.jmix.core.Messages messages
public boolean handle(java.lang.Throwable exception, UiExceptionHandler.UiContext context)
UiExceptionHandler
handle
in interface UiExceptionHandler
exception
- exception instancecontext
- UI contextprotected boolean doHandle(io.jmix.data.exception.UniqueConstraintViolationException exception, UiExceptionHandler.UiContext context)
protected java.lang.String getMessage(java.lang.String constraintName)
protected java.lang.String getDefaultMessage(java.lang.String constraintName)
public int getOrder()
getOrder
in interface org.springframework.core.Ordered