mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-20 19:20:07 +02:00
21 lines
569 B
Java
21 lines
569 B
Java
|
package com.wisemapping.exceptions;
|
||
|
|
||
|
import org.jetbrains.annotations.NotNull;
|
||
|
import org.springframework.context.MessageSource;
|
||
|
|
||
|
import java.util.Locale;
|
||
|
|
||
|
abstract public class ClientException extends WiseMappingException {
|
||
|
public ClientException(@NotNull String message) {
|
||
|
super(message);
|
||
|
}
|
||
|
|
||
|
protected abstract
|
||
|
@NotNull
|
||
|
String getMsgBundleKey();
|
||
|
|
||
|
public String getMessage(@NotNull final MessageSource messageSource, final @NotNull Locale locale) {
|
||
|
return messageSource.getMessage(this.getMsgBundleKey(), null, locale);
|
||
|
}
|
||
|
}
|