It's all about the answers!

Ask a question

How to access snapshot and baseline name using server side api in RTC


Nilesh Patil (1733650) | asked Jul 20 '16, 7:21 a.m.
edited Jul 25 '16, 4:15 p.m. by David Lafreniere (4.8k7)
 Hi all,

I am writing custom precondition for RTC to validate the snapshot and baseline name . Basically I am trying to implement naming convention for snapshot and baseline.

I explored on the api to get snapshot name but did find anything. Could you please let me (sample code would be very much helpful) how to get the snapshot and baseline name in server side precondition

Thank you all in advance

3 answers



permanent link
Ralph Schoon (63.1k33645) | answered Jul 20 '16, 7:41 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Here and in the related posts is some example code for baselines. https://rsjazz.wordpress.com/2013/09/30/delivering-change-sets-and-baselines-to-a-stream-using-the-plain-java-client-libraries/ most of the code should be common and be available in client and server API.

A snapshot is a IBaselineSetHandle or IBaselineSet and you should be able to find some hints here: https://www.google.com/search?q=baselineset+site:jazz.net

Comments
Nilesh Patil commented Jul 25 '16, 5:15 a.m. | edited Jul 25 '16, 5:16 a.m.
 Hi Ralph,
Thank you for quick response.
I need server side precondition, so that user can follow specific format to create snapshot and baselines.For Snapshot I am able to get snapshot name but I am not able to get baseline name. Which operationId we need to use to get Baseline name. Sample code would be very much helpful.


permanent link
sam detweiler (12.5k6195201) | answered Jul 25 '16, 7:47 a.m.
I think all the classes and methods you would need for SCM Handling would be in com.ibm.team.scm.common.*;

remember this is an object oriented system, there is not a 'single' api, but a collection of objects, methods and data items.

permanent link
V D (132) | answered Jan 30 '21, 1:49 p.m.

 Hello Guys,


I am able to fetch the list of snapshots from a given stream programmatically but I am unable to fetch the list of components within a snapshot. I need to copy some files from one component in the snapshot to a component outside the snapshot(in another stream)...

Please help...


Comments
David Lafreniere commented Feb 01 '21, 10:10 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

When you have a snapshot (IBaselineSet) you will need to fetch the full IBaseline objects (from the handles of IBaselineSet.getBaselines()). From there, you can get the component using IBaseline.getComponent().

Your answer


Register or to post your answer.