Interface RepositoryConfigurationExtension
- All Known Implementing Classes:
RepositoryConfigurationExtensionSupport
public interface RepositoryConfigurationExtension
SPI to implement store specific extension to the repository bean definition registration process.
- Author:
- Oliver Gierke, Christoph Strobl, John Blum
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the default location of the Spring Data named queries.default String
AString
uniquely identifying the module within all Spring Data modules.Returns the descriptive name of the module.default Class<? extends BeanRegistrationAotProcessor>
Returns theBeanRegistrationAotProcessor
type responsible for contributing AOT/native configuration required by the Spring Data Repository infrastructure components at native runtime.<T extends RepositoryConfigurationSource>
Collection<RepositoryConfiguration<T>>getRepositoryConfigurations
(T configSource, ResourceLoader loader, boolean strictMatchesOnly) Returns allRepositoryConfiguration
s obtained through the givenRepositoryConfigurationSource
.Returns thename
of the repository factory class to be used.void
postProcess
(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) Callback to post process theBeanDefinition
built from annotations and tweak the configuration if necessary.void
postProcess
(BeanDefinitionBuilder builder, RepositoryConfigurationSource config) Callback to post process theBeanDefinition
and tweak the configuration if necessary.void
postProcess
(BeanDefinitionBuilder builder, XmlRepositoryConfigurationSource config) Callback to post process theBeanDefinition
built from XML and tweak the configuration if necessary.void
registerBeansForRoot
(BeanDefinitionRegistry registry, RepositoryConfigurationSource configurationSource) Callback to register additional bean definitions for a repositories root node.
-
Method Details
-
getModuleIdentifier
AString
uniquely identifying the module within all Spring Data modules. Must not contain any spaces.- Returns:
- will never be null.
- Since:
- 3.0
-
getModuleName
String getModuleName()Returns the descriptive name of the module.- Returns:
- will never be null.
-
getRepositoryAotProcessor
Returns theBeanRegistrationAotProcessor
type responsible for contributing AOT/native configuration required by the Spring Data Repository infrastructure components at native runtime.- Returns:
- the
BeanRegistrationAotProcessor
type responsible for contributing AOT/native configuration. Defaults toRepositoryRegistrationAotProcessor
. Must not be null. - Since:
- 3.0
- See Also:
-
getRepositoryConfigurations
<T extends RepositoryConfigurationSource> Collection<RepositoryConfiguration<T>> getRepositoryConfigurations(T configSource, ResourceLoader loader, boolean strictMatchesOnly) Returns allRepositoryConfiguration
s obtained through the givenRepositoryConfigurationSource
.- Parameters:
configSource
-RepositoryConfigurationSource
encapsulating the source (XML, Annotation) of the repository configuration.loader
-ResourceLoader
used to load resources.strictMatchesOnly
- whether to return strict repository matches only. Handing in true will cause the repository interfaces and domain types handled to be checked whether they are managed by the current store.- Returns:
- will never be null.
- Since:
- 1.9
-
getDefaultNamedQueryLocation
String getDefaultNamedQueryLocation()Returns the default location of the Spring Data named queries.- Returns:
- will never be null.
-
getRepositoryFactoryBeanClassName
String getRepositoryFactoryBeanClassName()Returns thename
of the repository factory class to be used.- Returns:
- will never be null.
-
registerBeansForRoot
void registerBeansForRoot(BeanDefinitionRegistry registry, RepositoryConfigurationSource configurationSource) Callback to register additional bean definitions for a repositories root node. This usually includes beans you have to set up once independently of the number of repositories to be created. Will be called before any repositories bean definitions have been registered.- Parameters:
registry
-BeanDefinitionRegistry
containing bean definitions.configurationSource
-RepositoryConfigurationSource
encapsulating the source (e.g. XML, Annotation) of the repository configuration.
-
postProcess
Callback to post process theBeanDefinition
and tweak the configuration if necessary.- Parameters:
builder
- will never be null.config
- will never be null.
-
postProcess
Callback to post process theBeanDefinition
built from annotations and tweak the configuration if necessary.- Parameters:
builder
- will never be null.config
- will never be null.
-
postProcess
Callback to post process theBeanDefinition
built from XML and tweak the configuration if necessary.- Parameters:
builder
- will never be null.config
- will never be null.
-