It's all about the answers!

Ask a question

Accessing Stream name on which snapshot is creating(Server side API)


Pallavi Deore (38135) | asked Jun 12 '19, 7:26 a.m.

 Hello Everyone,


I am using CLM 6.0.6.
I want to create an advisor plugin for Naming convention for Snapshot in Source Control But in my case Naming convention for Snapshot depends on Stream name on which we are creating Snapshot.
I tried to access Stream using server side api but I am not getting Stream name on which we are creating snapshot.

Kindly provide me any API for accessing stream on which Snapshot is creating.

Regards
Pallavi



Comments
Ralph Schoon commented Jun 12 '19, 8:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

There is not even an obvious operation ID to use, I am not sure if this is possible. 


Pallavi Deore commented Jun 12 '19, 8:50 a.m.

Hi Ralph,


I have use "com.ibm.team.scm.server.modifyStream" operation id to trigger plugin for snapshot creation.
I have checked the code on jetty server and plugin is triggered on snapshot creation but not having idea how I can get Stream on which snapshot is creating.

Kindly suggest API for finding stream name on which snapshot created. 


Ralph Schoon commented Jun 12 '19, 9:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

If it is available at all, it is in the operation data. I would not bet on it. https://rsjazz.wordpress.com/2017/02/13/diy-stream-naming-convention-advisors/ shows the operationData. I would create an enhancement request. 

One answer



permanent link
David Lafreniere (4.8k7) | answered Jun 12 '19, 1:10 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
IModifyStreamOperationData.getTargetWorkspace() gives you the handle to the stream that had the snapshot created on it.
From there you just fetch the full IWorkspace (which is a stream) and call IWorkspace.getName() to get the name of the 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.