Thanks!  I'll try this approach :)

On Saturday, February 21, 2015, clement escoffier [via Apache Felix] <
ml-node+s18485n5011595...@n6.nabble.com> wrote:

> Hi,
>
> As I said in my previous mail, you can configure the filter in the
> instance configuration by using the `requires.filter` property. If you want
> something more programmatic, you can retrieve the dependency object from
> the Architecture service exposed by the instance, and from there use the
> `setFilter` method.
>
> You can also use interceptors, but this may be a bit complex just to set a
> filter (implementation speaking, dependency filter is an interceptor).
>
> Regards,
>
> Clement
>
> On 20 février 2015 at 14:02:01, Thiago Souza ([hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5011595&i=0>) wrote:
>
> Hi clement!
>
> But is there any way to specify the dependency filtering through
> configuration? I thought maybe using service binding interceptors, but I
> don't fully understand them yet.
>
> Thanks
>
> On Fri Feb 20 2015 at 10:56:15 AM clement escoffier [via Apache Felix] <
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=5011595&i=1>>
> wrote:
>
> > Hi,
> >
> > So, you can't use properties in your filters (even if it's a good idea).
>
> > However, you can specify the filter of your dependency in the instance
> > configuration (
> >
> >
> http://felix.apache.org/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components/service-requirement-handler.html#filtered-requirement
>
> > ):
> >
> > You need to set the "requires.filters" property to a map. This map
> > contains
> > the dependency id as key and the filter as value.
> >
> > Cheers,
> >
> > Clement
> >
> > 2015-02-20 13:43 GMT+01:00 Thiago Souza <[hidden email]
> > <http:///user/SendEmail.jtp?type=node&node=5011581&i=0>>:
> >
> > > Hi,
> > >
> > > Is it possible to define a @Requires filter with a value that is
> defined
> > in
> > > another property (i.e. @Requires(filter="${propName}")?
> > >
> > > If not, is there any way to dynamically select a dependency through
> > > configuration?
> > >
> > > Thanks,
> > > Thiago Souza
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://apache-felix.18485.x6.nabble.com/ipojo-filtering-dependency-through-configuration-tp5011580.html
>
> > > Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
> > >
> > > ---------------------------------------------------------------------
>
> > > To unsubscribe, e-mail: [hidden email]
> > <http:///user/SendEmail.jtp?type=node&node=5011581&i=1>
> > > For additional commands, e-mail: [hidden email]
> > <http:///user/SendEmail.jtp?type=node&node=5011581&i=2>
> > >
> > >
> >
> >
> > ------------------------------
> > If you reply to this email, your message will be added to the discussion
>
> > below:
> >
> >
> http://apache-felix.18485.x6.nabble.com/ipojo-filtering-dependency-through-configuration-tp5011580p5011581.html
>
> > To unsubscribe from [ipojo] filtering dependency through configuration,
> click
> > here
> > <
> > .
> > NAML
> > <
> http://apache-felix.18485.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
> >
>
>
>
>
> --
> View this message in context:
> http://apache-felix.18485.x6.nabble.com/ipojo-filtering-dependency-through-configuration-tp5011580p5011582.html
>
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-felix.18485.x6.nabble.com/ipojo-filtering-dependency-through-configuration-tp5011580p5011595.html
>  To unsubscribe from [ipojo] filtering dependency through configuration, click
> here
> <http://apache-felix.18485.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5011580&code=dGNvc3Rhc291emFAZ21haWwuY29tfDUwMTE1ODB8LTEyNzI0NjQ3MjU=>
> .
> NAML
> <http://apache-felix.18485.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://apache-felix.18485.x6.nabble.com/ipojo-filtering-dependency-through-configuration-tp5011580p5011596.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

Reply via email to