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

how to get all the streams under one projectArea?

How to get list of streams/workspaces from a given project area.

I have a repository and a Project area. I want to get the list of streams from PA using java API.

Thanks in advance

0 votes


Accepted answer

Permanent link

 Workspaces are owned by users. Streams are owned by project areas or team areas.


Searching for a bunch of the SCM items is done using search criteria.

https://rsjazz.wordpress.com/2013/09/24/managing-workspaces-streams-and-components-using-the-plain-java-client-libraries/ shows examples for this API. You would likely have to use com.ibm.team.scm.common.dto.IWorkspaceSearchCriteria.setExactOwnerName(String). 

David Lafreniere selected this answer as the correct answer

0 votes

Comments
Note: IWorkspaceSearchCriteria.setExactOwnerName(String) would work, but if you wrote your code with a hardcoded stream name, then there is a risk that the stream is renamed at a future date resulting in nothing being returned by the query.

To avoid this, you could call: IWorksapceSearchCriteria.getFilterByOwnerOptional().add(streamHandle);

Thanks David! 

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
× 10,927
× 411

Question asked: Aug 19 '19, 6:51 a.m.

Question was seen: 1,593 times

Last updated: Aug 20 '19, 1:04 a.m.

Confirmation Cancel Confirm