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

org.apache.wicket.bean.validation.IViolationTranslator Maven / Gradle / Ivy

There is a newer version: 10.1.0
Show newest version
package org.apache.wicket.bean.validation;

import javax.validation.ConstraintViolation;

import org.apache.wicket.validation.ValidationError;

/**
 * Converts {@link ConstraintViolation}s into Wicket's {@link ValidationError}s
 * 
 * @author igor
 * @see BeanValidationConfiguration#setViolationTranslator(org.apache.wicket.bean.validation.IViolationTranslator)
 */
@FunctionalInterface
public interface IViolationTranslator
{
	/**
	 * Converts a {@link ConstraintViolation} into a {@link ValidationError}
	 * 
	 * @param 
	 * @param violation
	 *            constraint violation from bean validation
	 * @return validation validation error to be reported on the component
	 */
	 ValidationError convert(ConstraintViolation violation);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy