It's all about the answers!

Ask a question

Locate which streams a changeset is on using RTC API.


Søren Bachmann (11122) | asked Sep 06 '12, 9:50 a.m.
edited Aug 05 '16, 3:39 p.m. by David Lafreniere (4.8k7)
Anyone who knows how to locate the streams a changeset is on, through the plain java client API?

Accepted answer


permanent link
David Lafreniere (4.8k7) | answered Aug 05 '16, 3:47 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
edited Nov 08 '16, 10:24 a.m.
As of RTC 4.0, you would want to take a look at the following:

List<IChangeSetHandle> changeSets = new ArrayList<IChangeSetHandle>();
changeSets.add({change_set_I_care_about}); // Note you can add multiple change sets here...

List<IWorkspaceHandle> streams = ... {this is the list of streams you want to look in, for example, prior to this you might want to run a query to find all the streams in a given project area, etc.}

ILocateChangeSetsSearchCriteria scope = ILocateChangeSetsSearchCriteria.FACTORY.create(changeSets , streams, Collections.EMPTY_LIST, Collections.EMPTY_LIST);

IWorkspaceManager workspaceManager = SCMPlatform.getWorkspaceManager(repository);

List<ILocateChangeSetsSearchResult> result = workspaceManager.locateChangeSets(scope, monitor);

Note: On the server, this ends up calling: IScmQueryService.findLocateChangeSets(ILocateChangeSetsSearchCriteria scope, IRepositoryProgressMonitorHandle repoMonitor)
Michael Valenta selected this answer as the correct answer

One other answer



permanent link
Surya Tripathi (65017) | answered Jul 17 '13, 9:52 p.m.
I think something like this might work for you-
IWorkspaceManager workspaceManager = SCMPlatform.getWorkspaceManager(repository);          IWorkspaceConnection workspaceConnection =
workspaceManager.getWorkspaceConnections(workspaceHandle,monitor);
workspaceConnection.hasChangeSets(changeSets, monitor);

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.