Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

Are there APIs to list all Streams in a project area?

 I do quite a few programmatic things with work items, but I don't see any APIs specifically to allow me to get a list of all Streams in a project area.  Does anyone have a pointer or snippet?

0 votes



One answer

Permanent link
what I use (plain java )
final IWorkspaceManager mgr = SCMPlatform.getWorkspaceManager(repo);
// get the list of streams
            IWorkspaceSearchCriteria streamsearchcriteria = IWorkspaceSearchCriteria.FACTORY.newInstance();
            streamsearchcriteria.setKind(IWorkspaceSearchCriteria.STREAMS);
            // loop thru all the streams on the src system
            for (IWorkspaceHandle iwsh : (List<IWorkspaceHandle>) mgr.findWorkspaces(streamsearchcriteria, IWorkspaceManager.MAX_QUERY_SIZE, null))
            {
                IWorkspaceConnection stream = mgr.getWorkspaceConnection(iwsh, null);

                // if this workspace is a stream
                if (stream.isStream()
                // AND it is in the same process area as the seleted project
                        && stream.getProcessArea(null).getItemId().getUuidValue().equals(owning_project.getProjectArea().getItemId().getUuidValue())

1 vote

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
× 12,036

Question asked: Mar 27 '15, 1:57 p.m.

Question was seen: 2,613 times

Last updated: Mar 28 '15, 8:02 a.m.

Confirmation Cancel Confirm