public class ValidationExtension extends Object implements Extension
ValidatorFactory
and Validator
representing default validator factory and validator as
configured via META-INF/validation.xml
. These beans will have the Default
qualifier and in addition
the HibernateValidator
qualifier if Hibernate Validator is the default validation provider.HibernateValidator
qualifier.Constructor and Description |
---|
ValidationExtension() |
Modifier and Type | Method and Description |
---|---|
void |
afterBeanDiscovery(AfterBeanDiscovery afterBeanDiscoveryEvent,
BeanManager beanManager)
Registers beans for
ValidatorFactory and Validator if not yet present. |
void |
beforeBeanDiscovery(BeforeBeanDiscovery beforeBeanDiscoveryEvent,
BeanManager beanManager)
Used to register the method validation interceptor binding annotation.
|
<T> void |
processAnnotatedType(ProcessAnnotatedType<T> processAnnotatedTypeEvent)
Used to register the method validation interceptor bindings.
|
void |
processBean(ProcessBean<?> processBeanEvent)
Watches the
ProcessBean event in order to determine whether beans for ValidatorFactory and
Validator already have been registered by some other component. |
public void beforeBeanDiscovery(@Observes BeforeBeanDiscovery beforeBeanDiscoveryEvent, BeanManager beanManager)
beforeBeanDiscoveryEvent
- event fired before the bean discovery process startsbeanManager
- the bean manager.public void afterBeanDiscovery(@Observes AfterBeanDiscovery afterBeanDiscoveryEvent, BeanManager beanManager)
ValidatorFactory
and Validator
if not yet present.afterBeanDiscoveryEvent
- event fired after the bean discovery phase.beanManager
- the bean manager.public void processBean(@Observes ProcessBean<?> processBeanEvent)
ProcessBean
event in order to determine whether beans for ValidatorFactory
and
Validator
already have been registered by some other component.processBeanEvent
- event fired for each enabled bean.public <T> void processAnnotatedType(@Observes ProcessAnnotatedType<T> processAnnotatedTypeEvent)
T
- the annotated typeprocessAnnotatedTypeEvent
- event fired for each annotated typeCopyright © 2019 JBoss by Red Hat. All rights reserved.