felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: repoAdmin.discoverResources() parameters
Date Tue, 06 Dec 2011 05:33:19 GMT
There really is no way to do this, since (if I understand correctly) you 
are trying to reverse the capability/requirement model.

Normally, you perform a query to find matching capabilities. From what I 
understand, you want to perform a query to find matching requirements.

A similar situation exists for fragments, since the host doesn't know 
about fragments and fragments have a dependency on the host. This was 
one of the reasons behind the not-fully-baked "extends" concept in OBR. 
The idea with extends is that you could find all bundles that "extend" 
another bundle. Still, to do this, you had to manually go through all 
bundles and check for "extends" requirements and then determine if it 
extended your target bundle. Not super great, but it works.

So, you'll likely have to do something similar here. Manually go through 
all bundles and determine which ones are importing your package.

An alternative, is to add a "IGB plugin" capability to each of your 
plugin's OBR resource description, which would contain the version as an 
attribute. Then you could easily query for all "IGB plugin" capabilities.

-> richard

On 12/5/11 15:07, Lance Frohman wrote:
> My group is using Apache Felix for plugins for a swing application (IGB),
> that has versions released every few months
> and we need to match the plugins to the appropriate versions of IGB. We are
> using OBR, but I don't know what parameters
> to give the repoAdmin.discoverResources() inside IGB to only receive the
> plugins for that version. IGB has a version number,
> currently 6.7.0, and in all the plugins, I have an Import-Package for one
> of the IGB packages, with the version suffix, like:
>
> Import-Package: com.affymetrix.common;version="6.6.0",
>
> now the statement is
>
> Resource[] allResourceArray =
> repoAdmin.discoverResources("(symbolicname=*)");
>
> can anyone tell me what to use as the parameter to only return bundles with
> package com.affymetrix.common fulfilling the current version of the
> application?
>
> (the repositories are at
> http://bioviz.org/igbserver/
> http://research-pub.gene.com/igb_plugins/
> http://research-pub.gene.com/igb_plugins/development/
> )
>
> thanks,
> Lance
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message