It's all about the answers!

Ask a question

How to get all categories and targets in one project area by using Java API?


qi li (133) | asked Oct 21 '13, 10:02 p.m.
How to get all categories(Filed Against) and targets(planned for) in one project area by using Java API?
I use the following code :
List<ICategory> categoryList = workItemClient.findCategories(projectArea, ItemProfile<ICategory> , monitor);

however, the code can not work, how to define the second parameter: ItemProfile<ICategory> ?

If anyone is familiar with such a way, I would be thankful.

One answer



permanent link
Ralph Schoon (63.5k33646) | answered Oct 22 '13, 2:12 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Here are some code examples for handling iterations that you could use: https://rsjazz.wordpress.com/2012/10/05/handling-iterations-automation-for-the-planned-for-attribute/

See https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ to understand load profiles.

Comments
Ralph Schoon commented Oct 22 '13, 2:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Also if you set up the SDK like described in https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/ you can use the Eclipse PDE's Java Search to look for references. You will find that there is code like

List<icategory> findCategories = workItemService.findCategories(
        targetProjectArea, ICategory.FULL_PROFILE, monitor);

And that the load profile is actually at the interface. You have SMALL_PROFILE and FULL_PROFILE at least.

Your answer


Register or 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.