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?
|
One answer
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()) |
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.