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 Details

    • getModuleIdentifier

      default String getModuleIdentifier()
      A String 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

      @NonNull default Class<? extends org.springframework.beans.factory.aot.BeanRegistrationAotProcessor> getRepositoryAotProcessor()
      Returns the BeanRegistrationAotProcessor 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 to RepositoryRegistrationAotProcessor. Must not be null.
      Since:
      3.0
      See Also:
      • BeanRegistrationAotProcessor
    • getRepositoryConfigurations

      <T extends RepositoryConfigurationSource> Collection<RepositoryConfiguration<T>> getRepositoryConfigurations(T configSource, org.springframework.core.io.ResourceLoader loader, boolean strictMatchesOnly)
      Returns all RepositoryConfigurations obtained through the given RepositoryConfigurationSource.
      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 the name of the repository factory class to be used.
      Returns:
      will never be null.
    • registerBeansForRoot

      void registerBeansForRoot(org.springframework.beans.factory.support.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

      void postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, RepositoryConfigurationSource config)
      Callback to post process the BeanDefinition and tweak the configuration if necessary.
      Parameters:
      builder - will never be null.
      config - will never be null.
    • postProcess

      void postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config)
      Callback to post process the BeanDefinition built from annotations and tweak the configuration if necessary.
      Parameters:
      builder - will never be null.
      config - will never be null.
    • postProcess

      void postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, XmlRepositoryConfigurationSource config)
      Callback to post process the BeanDefinition built from XML and tweak the configuration if necessary.
      Parameters:
      builder - will never be null.
      config - will never be null.