Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to generate List of all ProjectAreas with Plain Java API

Hi everyone,

I am total Newbie to RTC. I would like to know how to generate a list (String array, ...) of names of all ProjectAreas registered in a repository. I am Using the RTC Eclipse Client with Plain Java API on RTC 3.0. I am working on client side.

If anybody could help me, I would be very thankful.

Cheers,
Marco

0 votes



2 answers

Permanent link

Not sure if you are still looking for it. 


IProjectAreaHandle matchingProjectArea = null;

IItemType itemType= IProjectArea.ITEM_TYPE;

IDynamicQueryModel model= itemType.getQueryModel();

IItemQuery query= IItemQuery.FACTORY.newInstance((IItemQueryModel) model);

ItemQueryIterator<IProjectAreaHandle> iterator= new ItemQueryIterator<IProjectAreaHandle>(getAuditableCommon(), query);

List <IProjectAreaHandle> projectAreas = iterator.toList(monitor);

for (IProjectAreaHandle pa : projectAreas){

    		IProjectArea projectArea = (IProjectArea) repo.itemManager().fetchCompleteItem(pa, IItemManager.DEFAULT, monitor);
    String projectAreaName = projectArea.getName();    
    // Keep adding project area name to a list. }

0 votes

Comments
Cannot find the class "ItemQueryIterator"?


Permanent link
Marco,

you probably want to look at that example: https://rsjazz.wordpress.com/2012/12/09/analyzing-a-aroject-areas-members-and-roles-using-the-plain-java-client-libraries/

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Jan 12 '12, 5:22 a.m.

Question was seen: 5,434 times

Last updated: Jul 09 '13, 2:09 a.m.

Confirmation Cancel Confirm