How to programmatically get the latest snapshot details for a given Stream in RTC SCM.
Hello All,
|
Accepted answer
IWorkspaceManager#findBaselineSets(...) will return List<IBaselineSet> and you should be able to retrieve all the information with respect to the snapshot from IBaselineSet. David Lafreniere selected this answer as the correct answer
Comments
Jazzuser user
commented Jun 23 '17, 3:38 a.m.
Thanks for your reply Shashikant. I tried with findBaselineSets(...) but I am unable to get the latest snapshot.....could you please share any sample snippet.
IBaselineSetSearchCriteria criteria =
IBaselineSetSearchCriteria.FACTORY.newInstance();
criteria.setOwnerWorkspaceOptional(stream); // stream (IWorkspace) which owns the snapshot. Make sure that the snapshot is owned by the tream. You can verify this by the listing the snapshots of that stream using the RTC client.
If you know which project/team area (IProcessArea) owns the stream:
criteria.setProcessArea(processArea)
List<IBaselineSetHandle> baselineSetHandles = SCMPlatform.getWorkspaceManager(repo).findBaselineSets(criteria, 1, progressMonitor);
List<IBaselineSet> baselineSets = repo.itemManager().fetchCompleteItem(baselineSetHandles.get(0), IItemManager.DEFAULT, progressMonitor);
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} span.s1 {color: #7e504f} span.s2 {color: #0326cc} span.s3 {color: #931a68}
</style>
|
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.