Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 209683

Summary: [prov] API - querying unique IU's in a repo
Product: [Eclipse Project] Equinox Reporter: Susan McCourt <susan>
Component: IncubatorAssignee: equinox.incubator-inbox <equinox.incubator-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne, pascal
Version: 3.4   
Target Milestone: 3.4 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 209992    
Bug Blocks:    

Description Susan McCourt CLA 2007-11-13 13:49:34 EST
I am trying to find a way to query an array of IU's that represent the uniquely id'ed IU's in a repo.  The use case is that I want to show the user a list of IU's that are available for install that are version-independent.  The UI will then choose the latest compatible one for them, or alternatively they can expand the list to see the individual versions that are available.

A further complication is that I might be applying an additional query such as only group IUs.  

As far as I can tell, I have to query all of the IU's in a repo and then select only the unique id's.  I don't mind doing this, but it means I'm dragging down a bunch of info about all of the IU's from the repo when all I really want to know is what id's are out there, and I'll query the rest when I need it.

Is there already a way to do this?
If not, I think we should consider making this possible.  See also bug #209549
Comment 1 Susan McCourt CLA 2007-11-14 16:13:39 EST
After a lengthy discussion with John and Pascal, we've decided that:
- The IQueryable interface needs review and possibly more flexibility, but that is not urgent for M4.
- For the UI to get what it needs, it should define an interface like a queryable, but including some of the richer queries it needs such as:

* query for the latest version rather than a particular version (this solves the issue of getting unique ID's, also)
* query for matching property values (might not be needed if categories are expressed as a capability)
* possibly support richer expressions rather than a boolean indicating whether something is an AND or not

John will look at IQueryable some other time and we may push some of these UI-defined queries down into IQueryable.
Comment 2 Susan McCourt CLA 2007-12-04 16:47:51 EST
This was fixed by the new query API and the LatestIUVersionCollector.