Class MergeXmlBeanDefinitionReader.MergeBeanDefinitionDocumentReader

java.lang.Object
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader
org.broadleafcommerce.common.extensibility.MergeXmlBeanDefinitionReader.MergeBeanDefinitionDocumentReader
All Implemented Interfaces:
org.springframework.beans.factory.xml.BeanDefinitionDocumentReader
Enclosing class:
MergeXmlBeanDefinitionReader

public static class MergeXmlBeanDefinitionReader.MergeBeanDefinitionDocumentReader extends org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader
When beans are discovered using this reader this will take the previous definition and merge it with the new definition using AbstractBeanDefinition.overrideFrom(BeanDefinition). Useful for defining a default set of properties, constructor args, etc in 1 place and only overriding pieces of it when reading later files.
Author:
Phillip Verheyden (phillipuniverse)
  • Field Summary

    Fields inherited from class org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader

    ALIAS_ATTRIBUTE, ALIAS_ELEMENT, BEAN_ELEMENT, IMPORT_ELEMENT, logger, NAME_ATTRIBUTE, NESTED_BEANS_ELEMENT, PROFILE_ATTRIBUTE, RESOURCE_ATTRIBUTE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    Most of this method comes from BeanDefinitionParserDelegate.parseBeanDefinitionElement(Element).
    protected boolean
    isXMLBean(org.springframework.beans.factory.config.BeanDefinition beanDefinition)
     
    protected void
    processBeanDefinition(Element ele, org.springframework.beans.factory.xml.BeanDefinitionParserDelegate delegate)
    This is very similar to the parent method except that instead of always registering the new bean definition on top of the old one, this takes the originally-def

    Methods inherited from class org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader

    createDelegate, doRegisterBeanDefinitions, extractSource, getReaderContext, importBeanDefinitionResource, parseBeanDefinitions, postProcessXml, preProcessXml, processAliasRegistration, registerBeanDefinitions

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MergeBeanDefinitionDocumentReader

      public MergeBeanDefinitionDocumentReader()
  • Method Details

    • processBeanDefinition

      protected void processBeanDefinition(Element ele, org.springframework.beans.factory.xml.BeanDefinitionParserDelegate delegate)
      This is very similar to the parent method except that instead of always registering the new bean definition on top of the old one, this takes the originally-def

      SPRING-UPGRADE-CHECK

      Overrides:
      processBeanDefinition in class org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader
    • getBeanId

      protected String getBeanId(Element ele)
      Most of this method comes from BeanDefinitionParserDelegate.parseBeanDefinitionElement(Element). Copied here so that figuring out the bean id doesn't modify the document parsing
    • isXMLBean

      protected boolean isXMLBean(org.springframework.beans.factory.config.BeanDefinition beanDefinition)