You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Martin Krasser (JIRA)" <ji...@apache.org> on 2009/12/01 15:30:52 UTC
[jira] Resolved: (CAMEL-2244) Support for processing list-based
reference params in DefaultComponent.
[ https://issues.apache.org/activemq/browse/CAMEL-2244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Krasser resolved CAMEL-2244.
-----------------------------------
Resolution: Fixed
> Support for processing list-based reference params in DefaultComponent.
> -----------------------------------------------------------------------
>
> Key: CAMEL-2244
> URL: https://issues.apache.org/activemq/browse/CAMEL-2244
> Project: Apache Camel
> Issue Type: Improvement
> Affects Versions: 2.1.0
> Reporter: Martin Krasser
> Assignee: Martin Krasser
> Priority: Minor
> Fix For: 2.2.0
>
>
> Add a new method
> {noformat}
> <T> List<T> resolveAndRemoveReferenceListParameter(Map<String, Object> parameters, String key, Class<T> elementType, List<T> defaultValue)
> {noformat}
> to DefaultComponent for processing list-based reference params. Here's an example of a Spring application context with bean definitions followed by URIs that reference these beans.
> {code:xml}
> <bean id="filter1" class="..."/>
> <bean id="filter2" class="..."/>
> <util:list id="filterList">
> <ref bean="filter1" />
> <ref bean="filter2" />
> </util:list>
> {code}
> The new {{resolveAndRemoveReferenceListParameter}} handles the following cases.
> Resolve reference to a bean of type java.util.List and return that list.
> {noformat}
> from("mina:tcp://localhost:6142?filters=#filterList")
> {noformat}
> Resolve reference to a bean of type {{elementType}} (see method signature) and return a list containing that element.
> {noformat}
> from("mina:tcp://localhost:6142?filters=#filter1")
> {noformat}
> Resolve comma-separated reference list to beans of type {{elementType}} (see method signature) and return a list containing these elements.
> {noformat}
> from("mina:tcp://localhost:6142?filters=#filter1,#filter2")
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.