Top Description Fields Constructors Methods
com.sun.faces.cdi

public Class CdiExtension

extends Object
implements Extension
Class Inheritance
All Implemented Interfaces
jakarta.enterprise.inject.spi.Extension
Static Imports
com.sun.faces.cdi.CdiUtils.addAnnotatedTypes, .CdiUtils.getAnnotation, java.util.Collections.unmodifiableMap

The CDI extension.

Field Summary

Modifier and TypeField and Description
private Map<Class<?>, Class<? extends DataModel<?>>>
forClassToDataModelClass

Map of classes that can be wrapped by a data model to data model implementation classes

private static final Logger
LOGGER

Stores the logger.

private final Set<Type>
managedPropertyTargetTypes

Map of @ManagedProperty target types

private static final Class<?>[]
MOJARRA_MANAGED_BEANS

Array of Mojarra impl specific CDI managed bean classes to add to CDI.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
afterBeanDiscovery(AfterBeanDiscovery
the after bean discovery.
afterBeanDiscovery
,
BeanManager
the bean manager.
beanManager
)

AfterBeanDiscovery:

public void
afterDeploymentValidation(AfterDeploymentValidation
the after deployment validation event
event
,
BeanManager
the current bean manager
beanManager
)

AfterDeploymentValidation:

public void
beforeBeanDiscovery(BeforeBeanDiscovery
the before bean discovery.
beforeBeanDiscovery
,
BeanManager
the bean manager.
beanManager
)

BeforeBeanDiscovery:

  • add impl specific managed beans
public Map<Class<?>, Class<? extends DataModel<?>>>

Returns:

Map of classes that can be wrapped by a data model to data model implementation classes
getForClassToDataModelClass
()

Gets the map of classes that can be wrapped by a data model to data model implementation classes

public <
the generic bean type
T extends DataModel<?>
>
void
processBean(ProcessBean<T>
the process bean event
processBeanEvent
,
BeanManager
the current bean manager
beanManager
)

ProcessBean:

public <
the generic bean type
T
>
void
processManagedBean(ProcessManagedBean<T>
the process managed bean event
processManagedBeanEvent
,
BeanManager
the current bean manager
beanManager
)

ProcessManagedBean:

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

forClassToDataModelClassback to summary
private Map<Class<?>, Class<? extends DataModel<?>>> forClassToDataModelClass

Map of classes that can be wrapped by a data model to data model implementation classes

LOGGERback to summary
private static final Logger LOGGER

Stores the logger.

managedPropertyTargetTypesback to summary
private final Set<Type> managedPropertyTargetTypes

Map of @ManagedProperty target types

MOJARRA_MANAGED_BEANSback to summary
private static final Class<?>[] MOJARRA_MANAGED_BEANS

Array of Mojarra impl specific CDI managed bean classes to add to CDI. This is necessary in case Mojarra is provided by server instead of by webapp as is often the case in Jakarta EE environments.

Constructor Detail

CdiExtensionback to summary
public CdiExtension()

Method Detail

afterBeanDiscoveryback to summary
public void afterBeanDiscovery(AfterBeanDiscovery afterBeanDiscovery, BeanManager beanManager)

AfterBeanDiscovery:

Parameters
afterBeanDiscovery:AfterBeanDiscovery

the after bean discovery.

beanManager:BeanManager

the bean manager.

afterDeploymentValidationback to summary
public void afterDeploymentValidation(AfterDeploymentValidation event, BeanManager beanManager)

AfterDeploymentValidation:

Parameters
event:AfterDeploymentValidation

the after deployment validation event

beanManager:BeanManager

the current bean manager

beforeBeanDiscoveryback to summary
public void beforeBeanDiscovery(BeforeBeanDiscovery beforeBeanDiscovery, BeanManager beanManager)

BeforeBeanDiscovery:

  • add impl specific managed beans
Parameters
beforeBeanDiscovery:BeforeBeanDiscovery

the before bean discovery.

beanManager:BeanManager

the bean manager.

getForClassToDataModelClassback to summary
public Map<Class<?>, Class<? extends DataModel<?>>> getForClassToDataModelClass()

Gets the map of classes that can be wrapped by a data model to data model implementation classes

Returns:Map<Class<?>, Class<? extends DataModel<?>>>

Map of classes that can be wrapped by a data model to data model implementation classes

processBeanback to summary
public <T extends DataModel<?>> void processBean(ProcessBean<T> processBeanEvent, BeanManager beanManager)

ProcessBean:

Parameters
<T>
the generic bean type
processBeanEvent:ProcessBean<T>

the process bean event

beanManager:BeanManager

the current bean manager

Annotations
@SuppressWarnings:unchecked
processManagedBeanback to summary
public <T> void processManagedBean(ProcessManagedBean<T> processManagedBeanEvent, BeanManager beanManager)

ProcessManagedBean:

Parameters
<T>
the generic bean type
processManagedBeanEvent:ProcessManagedBean<T>

the process managed bean event

beanManager:BeanManager

the current bean manager