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

org.hibernate.validator.spi.scripting.ScriptEvaluatorFactory Maven / Gradle / Ivy

Go to download

JSR 380's RI, Hibernate Validator version ${hibernate-validator.version} and its dependencies repackaged as OSGi bundle

There is a newer version: 5.1.0
Show newest version
/*
 * Hibernate Validator, declare and validate application constraints
 *
 * License: Apache License, Version 2.0
 * See the license.txt file in the root directory or .
 */
package org.hibernate.validator.spi.scripting;

import javax.validation.ValidatorFactory;

import org.hibernate.validator.Incubating;
import org.hibernate.validator.constraints.ParameterScriptAssert;
import org.hibernate.validator.constraints.ScriptAssert;

/**
 * Factory used to initialize the {@link ScriptEvaluator}s required to evaluate script expressions defined in
 * {@link ScriptAssert} and {@link ParameterScriptAssert} constraints.
 *
 * @author Marko Bekhta
 * @since 6.0.3
 */
@Incubating
public interface ScriptEvaluatorFactory {

	/**
	 * Retrieves a script evaluator {@link ScriptEvaluator} for the given language.
	 *
	 * @param languageName the name of a scripting language
	 *
	 * @return a script executor for the given language. Never null.
	 *
	 * @throws ScriptEvaluatorNotFoundException in case no {@link ScriptEvaluator} was
	 * found for a given {@code languageName}.
	 */
	ScriptEvaluator getScriptEvaluatorByLanguageName(String languageName);


	/**
	 * Clear the state of the factory.
	 * 

* Called when the {@link ValidatorFactory} is closed. */ void clear(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy