[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [p2-dev] Categorising IUs in an existing p2 repo using category.xml
- From: Pascal Rapicault <pascal@xxxxxxxxxxxxx>
- Date: Fri, 23 Mar 2012 13:26:19 -0400
- Delivered-to: email@example.com
On 2012-03-18, at 3:04 PM, Dileepa Jayakody wrote:
> Hi Devs,
> I have a requirement of categorising IUs in an existing P2 Repo so that when the available features of the repo are queried, they are shown in groups under categories (like the 'Grouped by' feature in Eclipse). I came across the concept of category.xml to explicitly define IUs under categories.
> My question is how can I retrieve this category metadata when I query the available IUs from the repo?
> Can I use IRepository.getProperties() method to read the category metadata from the category.xml in the p2 repo?
> Or do I have to run 'Category Publisher' application to encode the category data into content.xml of the p2 repo; is there any other alternative method to categorise IUs in an existing repo?
The category.xml is only an authoring format. In the end, the categories are represented by IUs (InstallableUnit) that are part of the metadata repository (content.xml). Theses IUs are generated by the 'Category Publisher'. Like any IU those can be access by querying the repository. The query can be created using the following: QueryUtil#createIUCategoryQuery.
Consulting, training, bug fixing - pascal (at) rapicault.net
> p2-dev mailing list