org.springframework.data.repository.cdi

## Class CdiRepositoryExtensionSupport

- java.lang.Object
- - org.springframework.data.repository.cdi.CdiRepositoryExtensionSupport

All Implemented Interfaces:
  javax.enterprise.inject.spi.Extension

    public abstract class CdiRepositoryExtensionSupport
    extends Object
    implements javax.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

### Constructor Summary

Constructors
`protected` `CdiRepositoryExtensionSupport()`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected CustomRepositoryImplementationDetector` `getCustomImplementationDetector()`
`protected CdiRepositoryContext` `getRepositoryContext()`
`protected Iterable<Map.Entry<Class<?>,Set<Annotation>>>` `getRepositoryTypes()` Provides access to all repository types as well as their qualifiers.
`protected <X> void` `processAnnotatedType(javax.enterprise.inject.spi.ProcessAnnotatedType<X> processAnnotatedType)` Implementation of a an observer which checks for Spring Data repository types and stores them in `repositoryTypes` for later registration as bean type.
`protected void` `registerBean(CdiRepositoryBean<?> bean)` Registers the given `CdiRepositoryBean` for further general treatment by the infrastructure.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CdiRepositoryExtensionSupport

    protected CdiRepositoryExtensionSupport()

### Method Detail

#### processAnnotatedType

    protected <X> void processAnnotatedType(@Observes
                                            javax.enterprise.inject.spi.ProcessAnnotatedType<X> processAnnotatedType)

Implementation of a an observer which checks for Spring Data repository types and stores them in `repositoryTypes` for later registration as bean type.

Type Parameters:
  `X` - The type.
Parameters:
  `processAnnotatedType` - The annotated type as defined by CDI.

#### getRepositoryTypes

    protected Iterable<Map.Entry<Class<?>,Set<Annotation>>> getRepositoryTypes()

Provides access to all repository types as well as their qualifiers.

Returns:

#### registerBean

    protected void registerBean(CdiRepositoryBean<?> bean)

Registers the given `CdiRepositoryBean` for 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

    protected CustomRepositoryImplementationDetector getCustomImplementationDetector()

Returns:
  the `CustomRepositoryImplementationDetector` to scan for the custom implementation

#### getRepositoryContext

    protected CdiRepositoryContext getRepositoryContext()

Returns:
  the `CdiRepositoryContext` encapsulating the CDI-specific class loaders and fragment scanning.
Since:
  2.1