Package com.sun.faces.cdi
Class CdiExtension
java.lang.Object
com.sun.faces.cdi.CdiExtension
- All Implemented Interfaces:
jakarta.enterprise.inject.spi.Extension
The CDI extension.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterBeanDiscovery
(jakarta.enterprise.inject.spi.AfterBeanDiscovery afterBeanDiscovery, jakarta.enterprise.inject.spi.BeanManager beanManager) AfterBeanDiscovery: add all CDI producer beans allowing EL resolving of Faces specific artifacts add a managed property type producer bean for each managed property type discovered inprocessManagedBean(ProcessManagedBean, BeanManager)
void
afterDeploymentValidation
(jakarta.enterprise.inject.spi.AfterDeploymentValidation event, jakarta.enterprise.inject.spi.BeanManager beanManager) AfterDeploymentValidation: sort faces data models discovered inprocessBean(ProcessBean, BeanManager)
for use byDataModelClassesMapProducer
void
beforeBeanDiscovery
(jakarta.enterprise.inject.spi.BeforeBeanDiscovery beforeBeanDiscovery, jakarta.enterprise.inject.spi.BeanManager beanManager) BeforeBeanDiscovery: add impl specific managed beansGets the map of classes that can be wrapped by a data model to data model implementation classes<T extends DataModel<?>>
voidprocessBean
(jakarta.enterprise.inject.spi.ProcessBean<T> processBeanEvent, jakarta.enterprise.inject.spi.BeanManager beanManager) ProcessBean: if bean is annotated with@FacesDataModel
then collect it forafterDeploymentValidation(AfterDeploymentValidation, BeanManager)
<T> void
processManagedBean
(jakarta.enterprise.inject.spi.ProcessManagedBean<T> processManagedBeanEvent, jakarta.enterprise.inject.spi.BeanManager beanManager) ProcessManagedBean: if bean has field with@ManagedProperty
then collect its type forafterBeanDiscovery(AfterBeanDiscovery, BeanManager)
-
Constructor Details
-
CdiExtension
public CdiExtension()
-
-
Method Details
-
beforeBeanDiscovery
public void beforeBeanDiscovery(@Observes jakarta.enterprise.inject.spi.BeforeBeanDiscovery beforeBeanDiscovery, jakarta.enterprise.inject.spi.BeanManager beanManager) BeforeBeanDiscovery:- add impl specific managed beans
- Parameters:
beforeBeanDiscovery
- the before bean discovery.beanManager
- the bean manager.
-
processBean
public <T extends DataModel<?>> void processBean(@Observes jakarta.enterprise.inject.spi.ProcessBean<T> processBeanEvent, jakarta.enterprise.inject.spi.BeanManager beanManager) ProcessBean:- if bean is annotated with
@FacesDataModel
then collect it forafterDeploymentValidation(AfterDeploymentValidation, BeanManager)
- Type Parameters:
T
- the generic bean type- Parameters:
processBeanEvent
- the process bean eventbeanManager
- the current bean manager
- if bean is annotated with
-
processManagedBean
public <T> void processManagedBean(@Observes jakarta.enterprise.inject.spi.ProcessManagedBean<T> processManagedBeanEvent, jakarta.enterprise.inject.spi.BeanManager beanManager) ProcessManagedBean:- if bean has field with
@ManagedProperty
then collect its type forafterBeanDiscovery(AfterBeanDiscovery, BeanManager)
- Type Parameters:
T
- the generic bean type- Parameters:
processManagedBeanEvent
- the process managed bean eventbeanManager
- the current bean manager
- if bean has field with
-
afterBeanDiscovery
public void afterBeanDiscovery(@Observes jakarta.enterprise.inject.spi.AfterBeanDiscovery afterBeanDiscovery, jakarta.enterprise.inject.spi.BeanManager beanManager) AfterBeanDiscovery:- add all CDI producer beans allowing EL resolving of Faces specific artifacts
- add a managed property type producer bean for each managed property type discovered in
processManagedBean(ProcessManagedBean, BeanManager)
- Parameters:
afterBeanDiscovery
- the after bean discovery.beanManager
- the bean manager.
-
afterDeploymentValidation
public void afterDeploymentValidation(@Observes jakarta.enterprise.inject.spi.AfterDeploymentValidation event, jakarta.enterprise.inject.spi.BeanManager beanManager) AfterDeploymentValidation:- sort faces data models discovered in
processBean(ProcessBean, BeanManager)
for use byDataModelClassesMapProducer
- Parameters:
event
- the after deployment validation eventbeanManager
- the current bean manager
- sort faces data models discovered in
-
getForClassToDataModelClass
Gets the map of classes that can be wrapped by a data model to data model implementation classes- Returns:
- Map of classes that can be wrapped by a data model to data model implementation classes
-