Class CdiRepositoryExtensionSupport
java.lang.Object
org.springframework.data.repository.cdi.CdiRepositoryExtensionSupport
- All Implemented Interfaces:
jakarta.enterprise.inject.spi.Extension
public abstract class CdiRepositoryExtensionSupport
extends Object
implements jakarta.enterprise.inject.spi.Extension
Base class for
Extension implementations that create instances for Spring Data repositories.- Author:
- Dirk Mahler, Oliver Gierke, Mark Paluch, Christoph Strobl, Xeno Amess
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CustomRepositoryImplementationDetectorprotected CdiRepositoryContextprotected Iterable<Map.Entry<Class<?>,Set<Annotation>>> Provides access to all repository types as well as their qualifiers.protected <X> voidprocessAnnotatedType(jakarta.enterprise.inject.spi.ProcessAnnotatedType<X> processAnnotatedType) Implementation of a an observer which checks for Spring Data repository types and stores them inrepositoryTypesfor later registration as bean type.protected voidregisterBean(CdiRepositoryBean<?> bean) Registers the givenCdiRepositoryBeanfor further general treatment by the infrastructure.
-
Constructor Details
-
CdiRepositoryExtensionSupport
protected CdiRepositoryExtensionSupport()
-
-
Method Details
-
processAnnotatedType
protected <X> void processAnnotatedType(@Observes jakarta.enterprise.inject.spi.ProcessAnnotatedType<X> processAnnotatedType) Implementation of a an observer which checks for Spring Data repository types and stores them inrepositoryTypesfor later registration as bean type.- Type Parameters:
X- The type.- Parameters:
processAnnotatedType- The annotated type as defined by CDI.
-
getRepositoryTypes
Provides access to all repository types as well as their qualifiers.- Returns:
-
registerBean
Registers the givenCdiRepositoryBeanfor further general treatment by the infrastructure. In particular, this will cause repositories to be instantiated eagerly if marked as such.- Parameters:
bean- must not be null.- See Also:
-
afterDeploymentValidation(AfterDeploymentValidation, BeanManager)
-
getCustomImplementationDetector
- Returns:
- the
CustomRepositoryImplementationDetectorto scan for the custom implementation
-
getRepositoryContext
- Returns:
- the
CdiRepositoryContextencapsulating the CDI-specific class loaders and fragment scanning. - Since:
- 2.1
-