Locate which streams a changeset is on using RTC API.
![]()
Søren Bachmann (11●1●2●2)
| asked Sep 06 '12, 9:50 a.m.
edited Aug 05 '16, 3:39 p.m. by David Lafreniere (4.8k●7)
Anyone who knows how to locate the streams a changeset is on, through the plain java client API?
|
Accepted answer
![]()
David Lafreniere (4.8k●7)
| 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
![]()
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
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.