Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Spring Data Commons
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.data.repository.config
Class AbstractRepositoryConfigDefinitionParser<S extends GlobalRepositoryConfigInformation<T>,T extends SingleRepositoryConfigInformation<S>>

    java.lang.Object
      org.springframework.data.repository.config.AbstractRepositoryConfigDefinitionParser<S,T>

All Implemented Interfaces:
  BeanDefinitionParser

    public abstract class AbstractRepositoryConfigDefinitionParser<S extends GlobalRepositoryConfigInformation<T>,T extends SingleRepositoryConfigInformation<S>>

extends Object
implements BeanDefinitionParser

Base class to implement repository namespaces. These will typically consist of a main XML element potentially having child elements. The parser will wrap the XML element into a `GlobalRepositoryConfigInformation` object and allow either manual configuration or automatic detection of repository interfaces.

Author:
  Oliver Gierke

Constructor Summary
`AbstractRepositoryConfigDefinitionParser()`

Method Summary
`protected abstract S` | `getGlobalRepositoryConfigInformation(Element element)` Returns a `GlobalRepositoryConfigInformation` implementation for the given element.
`protected static boolean` | `hasBean(Class<?> type, BeanDefinitionRegistry registry)` Returns whether the given `BeanDefinitionRegistry` already contains a bean of the given type assuming the bean name has been autogenerated.
`BeanDefinition` | `parse(Element element, ParserContext parser)`
`protected void` | `postProcessBeanDefinition(T context, BeanDefinitionBuilder builder, BeanDefinitionRegistry registry, Object beanSource)` Callback to post process a repository bean definition prior to actual registration.
`protected void` | `registerBeansForRoot(BeanDefinitionRegistry registry, Object source)` Callback to register additional bean definitions for a repositories root node.
`protected static String` | `registerWithSourceAndGeneratedBeanName(BeanDefinitionRegistry registry, AbstractBeanDefinition bean, Object source)` Sets the given source on the given `AbstractBeanDefinition` and registers it inside the given `BeanDefinitionRegistry`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractRepositoryConfigDefinitionParser

    public AbstractRepositoryConfigDefinitionParser()

Method Detail

### parse

    public BeanDefinition parse(Element element,
                                ParserContext parser)

  Specified by:
    `parse` in interface `BeanDefinitionParser`

### getGlobalRepositoryConfigInformation

    protected abstract S getGlobalRepositoryConfigInformation(Element element)

  Returns a `GlobalRepositoryConfigInformation` implementation for the given element.

  Parameters:
    `element` -
  Returns:

### postProcessBeanDefinition

    protected void postProcessBeanDefinition(T context,
                                             BeanDefinitionBuilder builder,
                                             BeanDefinitionRegistry registry,
                                             Object beanSource)

  Callback to post process a repository bean definition prior to actual registration.

  Parameters:
    `context` -
    `builder` -
    `beanSource` -

### registerBeansForRoot

    protected void registerBeansForRoot(BeanDefinitionRegistry registry,
                                        Object source)

  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` -
    `source` -

### hasBean

    protected static boolean hasBean(Class<?> type,
                                     BeanDefinitionRegistry registry)

  Returns whether the given `BeanDefinitionRegistry` already contains a bean of the given type assuming the bean name has been autogenerated.

  Parameters:
    `type` -
    `registry` -
  Returns:

### registerWithSourceAndGeneratedBeanName

    protected static String registerWithSourceAndGeneratedBeanName(BeanDefinitionRegistry registry,
                                                                   AbstractBeanDefinition bean,
                                                                   Object source)

  Sets the given source on the given `AbstractBeanDefinition` and registers it inside the given `BeanDefinitionRegistry`.

  Parameters:
    `registry` -
    `bean` -
    `source` -
  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Spring Data Commons
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011. All Rights Reserved.