org.hibernate.validator.HibernateValidatorFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-validator Show documentation
Show all versions of hibernate-validator Show documentation
JPMS Module-Info's for a few of the Jakarta Libraries. These will be removed as time goes by
/*
* 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;
import java.time.Duration;
import jakarta.validation.ValidatorFactory;
import org.hibernate.validator.constraints.ParameterScriptAssert;
import org.hibernate.validator.constraints.ScriptAssert;
import org.hibernate.validator.spi.properties.GetterPropertySelectionStrategy;
import org.hibernate.validator.spi.scripting.ScriptEvaluator;
import org.hibernate.validator.spi.scripting.ScriptEvaluatorFactory;
/**
* Provides Hibernate Validator extensions to {@link ValidatorFactory}.
*
* @author Emmanuel Bernard
* @author Kevin Pollet <[email protected]> (C) 2011 SERLI
*/
public interface HibernateValidatorFactory extends ValidatorFactory {
/**
* Returns the factory responsible for creating {@link ScriptEvaluator}s used to
* evaluate script expressions of {@link ScriptAssert} and {@link ParameterScriptAssert}
* constraints.
*
* @return a {@link ScriptEvaluatorFactory} instance
*
* @since 6.0.3
*/
@Incubating
ScriptEvaluatorFactory getScriptEvaluatorFactory();
/**
* Returns the temporal validation tolerance i.e. the acceptable margin of error when comparing date/time in
* temporal constraints.
*
* @return the tolerance
*
* @since 6.0.5
*/
@Incubating
Duration getTemporalValidationTolerance();
/**
* Returns the getter property selection strategy defining the rules determining if a method is a getter or not.
*
* @return the getter property selection strategy of the current {@link ValidatorFactory}
*
* @since 6.1.0
*/
@Incubating
GetterPropertySelectionStrategy getGetterPropertySelectionStrategy();
/**
* Returns a context for validator configuration via options from the
* Bean Validation API as well as specific ones from Hibernate Validator.
*
* @return A context for validator configuration.
*/
@Override
HibernateValidatorContext usingContext();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy