You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Dominik Przybysz (JIRA)" <ji...@apache.org> on 2017/08/08 20:40:00 UTC
[jira] [Resolved] (ARIES-1733) Injecting array, set or list of
beans in BMP
[ https://issues.apache.org/jira/browse/ARIES-1733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dominik Przybysz resolved ARIES-1733.
-------------------------------------
Resolution: Done
> Injecting array, set or list of beans in BMP
> --------------------------------------------
>
> Key: ARIES-1733
> URL: https://issues.apache.org/jira/browse/ARIES-1733
> Project: Aries
> Issue Type: New Feature
> Components: Blueprint
> Reporter: Dominik Przybysz
> Assignee: Dominik Przybysz
> Fix For: blueprint-maven-plugin-1.8.0
>
>
> Bean like this:
> {code}
> @Bean
> public class BeanWithCollections {
> @CollectionInject(I1.class)
> List<I1> listFieldInject;
> @CollectionInject(I1.class)
> Set<I1> setFieldInject;
> @CollectionInject(I2.class)
> I2[] arrayFieldInject;
> @AnnotatedService
> @CollectionInject(I1.class)
> Set<I1> annotatedSetFieldInject;
> @CollectionInject(I1.class)
> public void setListSetterInject(List<I1> l) {
> }
> @CollectionInject(I2.class)
> public void setSetSetterInject(Set<I1> l) {
> }
> @CollectionInject(I1.class)
> public void setArraySetterInject(I1[] l) {
> }
> @AnnotatedService
> @CollectionInject(I2.class)
> public void setAnnotatedArraySetterInject(I2[] l) {
> }
> public BeanWithCollections(
> @CollectionInject(I1.class) List<I1> listOfI1,
> @CollectionInject(I1.class) Set<I1> setOfI1,
> @CollectionInject(I2.class) I2[] arrayOfI2,
> @CollectionInject(I1.class) @AnnotatedService List<I1> listOfAnnotatedI1,
> @CollectionInject(I3.class) List<I3> listOfNotExistingI3,
> @CollectionInject(I3.class) Set<I3> setOfNotExistingI3,
> @CollectionInject(I3.class) I3[] arrayOfNotExistingI3
> ) {
> }
> }
> {code}
> should be generated in blueprint xml as:
> {code}
> <bean xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" id="beanWithCollections" class="org.apache.aries.blueprint.plugin.test.collection.BeanWithCollections" ext:field-injection="true">
> <argument>
> <list>
> <ref component-id="i1Impl1"/>
> <ref component-id="i1Impl2"/>
> <ref component-id="i1Impl3Annotated"/>
> <ref component-id="i1Impl4Annotated"/>
> </list>
> </argument>
> <argument>
> <set>
> <ref component-id="i1Impl1"/>
> <ref component-id="i1Impl2"/>
> <ref component-id="i1Impl3Annotated"/>
> <ref component-id="i1Impl4Annotated"/>
> </set>
> </argument>
> <argument>
> <array>
> <ref component-id="i2Impl1"/>
> <ref component-id="i2Impl2Annotated"/>
> <ref component-id="i2Impl3Annotated"/>
> </array>
> </argument>
> <argument>
> <list>
> <ref component-id="i1Impl3Annotated"/>
> <ref component-id="i1Impl4Annotated"/>
> </list>
> </argument>
> <argument>
> <list/>
> </argument>
> <argument>
> <set/>
> </argument>
> <argument>
> <array/>
> </argument>
> <property name="annotatedArraySetterInject">
> <array>
> <ref component-id="i2Impl2Annotated"/>
> <ref component-id="i2Impl3Annotated"/>
> </array>
> </property>
> <property name="annotatedSetFieldInject">
> <set>
> <ref component-id="i1Impl3Annotated"/>
> <ref component-id="i1Impl4Annotated"/>
> </set>
> </property>
> <property name="arrayFieldInject">
> <array>
> <ref component-id="i2Impl1"/>
> <ref component-id="i2Impl2Annotated"/>
> <ref component-id="i2Impl3Annotated"/>
> </array>
> </property>
> <property name="arraySetterInject">
> <array>
> <ref component-id="i1Impl1"/>
> <ref component-id="i1Impl2"/>
> <ref component-id="i1Impl3Annotated"/>
> <ref component-id="i1Impl4Annotated"/>
> </array>
> </property>
> <property name="listFieldInject">
> <list>
> <ref component-id="i1Impl1"/>
> <ref component-id="i1Impl2"/>
> <ref component-id="i1Impl3Annotated"/>
> <ref component-id="i1Impl4Annotated"/>
> </list>
> </property>
> <property name="listSetterInject">
> <list>
> <ref component-id="i1Impl1"/>
> <ref component-id="i1Impl2"/>
> <ref component-id="i1Impl3Annotated"/>
> <ref component-id="i1Impl4Annotated"/>
> </list>
> </property>
> <property name="setFieldInject">
> <set>
> <ref component-id="i1Impl1"/>
> <ref component-id="i1Impl2"/>
> <ref component-id="i1Impl3Annotated"/>
> <ref component-id="i1Impl4Annotated"/>
> </set>
> </property>
> <property name="setSetterInject">
> <set>
> <ref component-id="i2Impl1"/>
> <ref component-id="i2Impl2Annotated"/>
> <ref component-id="i2Impl3Annotated"/>
> </set>
> </property>
> </bean>
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)