com.github.ldeitos.validation.MessagesSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of extendedValidation-core Show documentation
Show all versions of extendedValidation-core Show documentation
Extension for BeanValidation API Core. Content interfaces, qualifiers and constraints definitions.
This version is Java 17 and JakartaEE 10 compatible.
The newest version!
package com.github.ldeitos.validation;
import java.util.Locale;
/**
* Interface to messages sources.
* Messages sources can be properties files, data bases, external modules or
* applications, mainframe routines or any else.
*
* @author Leandro Deitos
*
*/
public interface MessagesSource {
/**
* @param key
* Message key to recover from source.
* @return
* Recovered message or, case isn't, the same solicited key.
*/
String getMessage(String key);
/**
*
* @param key
* Message key to recover from source.
* @param locale
* Locale to define message language. May be null.
* @return
* Recovered message or, case isn't, the same solicited key.
*/
String getMessage(String key, Locale locale);
}