It's all about the answers!

Ask a question

How to retrieve the snapshot names available under stream using java API ???


vinitha dsouza (14723136) | asked Jul 23 '14, 9:38 a.m.




Comments
Mustafa Askin commented Jul 23 '14, 10:39 a.m. | edited Jul 23 '14, 10:39 a.m.

 Which version are you using?


vinitha dsouza commented Jul 24 '14, 1:16 a.m.

I am using RTC eclipse client 3.8 version

Accepted answer


permanent link
Tim Mok (6.6k38) | answered Jul 23 '14, 10:50 a.m.
JAZZ DEVELOPER
Get the baseline sets from the IWorkspaceConnection. Then resolve the IBaselineSetHandles and you can get the names.
vinitha dsouza selected this answer as the correct answer

Comments
vinitha dsouza commented Jul 24 '14, 1:17 a.m.

Can you provide me the code snippet for the same??


Tim Mok commented Jul 24 '14, 7:47 a.m.
JAZZ DEVELOPER
List<IBaselineSetHandle> snapshots = IWorkspaceConnection#getBaselineSets(monitor);
ITeamRepository repo = IWorkspaceConnection#teamRepository();
List<IBaselineSet> fetchedSnapshots = repo.itemManager().fetchCompleteItems(snapshots, IItemManager.DEFAULT, monitor);
for (IBaselineSet snapshot : fetchedSnapshots) {
snapshot.getName();
}

vinitha dsouza commented Aug 22 '14, 7:57 a.m.

Hello Tim
Thank You for the Post.
The above code list the snapshot names for a entire project area...I just wanted to know one more thing that ,how will I get the snapshot name for a selected stream??


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.