Changeset 5339

Show
Ignore:
Timestamp:
09/04/10 21:53:11 (17 months ago)
Author:
ffray
Message:

Added parent-bean-ref attribute to resource-Element and ContextResourceParsingHandler?. Added missing attributes bean-name and scope to XSD.

Location:
branches/release-0.13.x/pfixcore
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/release-0.13.x/pfixcore/projects/core/schema/context-xml-service-config.xsd

    r3962 r5339  
    316316    </xs:sequence> 
    317317    <xs:attribute name="class" use="required"/> 
     318    <xs:attribute name="bean-name" use="optional" /> 
     319    <xs:attribute name="scope" use="optional" /> 
     320    <xs:attribute name="parent-bean-ref" use="optional"/> 
    318321  </xs:complexType> 
    319322 
  • branches/release-0.13.x/pfixcore/src/org/pustefixframework/config/contextxmlservice/parser/ContextResourceParsingHandler.java

    r3942 r5339  
    6161         
    6262        Element element = (Element)context.getNode(); 
    63         ParsingUtils.checkAttributes(element, new String[] {"class"}, new String[] {"bean-name", "scope"}); 
     63        ParsingUtils.checkAttributes(element, new String[] {"class"}, new String[] {"bean-name", "scope", "parent-bean-ref"}); 
    6464         
    6565        ContextConfigImpl config = ParsingUtils.getSingleTopObject(ContextConfigImpl.class, context); 
     
    112112             
    113113        BeanDefinitionBuilder beanBuilder = BeanDefinitionBuilder.genericBeanDefinition(implClass); 
     114        String parentBeanRef = element.getAttribute("parent-bean-ref").trim(); 
     115        if (parentBeanRef.length() != 0) { 
     116            beanBuilder.setParentName(parentBeanRef); 
     117        } 
    114118        beanBuilder.setScope(scope); 
    115119        BeanDefinition beanDefinition = beanBuilder.getBeanDefinition();