Class BeanValidationProducer
java.lang.Object
fr.paris.lutece.portal.util.mvc.binding.validate.BeanValidationProducer
Produces Bean Validation validation objects. Will try to get the default ones provided by the
Jakarta EE contrainer and falls back to build a custom ones.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit()We should be able to get a ValidatorFactory from the container in an jakarta EE environment.jakarta.validation.ValidatorFactory
-
Constructor Details
-
BeanValidationProducer
public BeanValidationProducer()
-
-
Method Details
-
init
@PostConstruct public void init()We should be able to get a ValidatorFactory from the container in an jakarta EE environment. However, if we don't get the factory, we will will use a default one. This is especially useful for non jakarta EE environments and in the CDI tests -
produceValidationFactory
@Produces @MvcInternal @ApplicationScoped public jakarta.validation.ValidatorFactory produceValidationFactory()
-