Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

 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


0 votes

Comments

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

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. 

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
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.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Jun 12 '19, 7:26 a.m.

Question was seen: 1,841 times

Last updated: Jun 12 '19, 1:10 p.m.

Confirmation Cancel Confirm