All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.ldeitos.validation.MessagesSource Maven / Gradle / Ivy

Go to download

Extension for BeanValidation API Core. Content interfaces, qualifiers and constraints definitions. This version is Java 17 and JakartaEE 10 compatible.

There is a newer version: 3.0
Show 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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy