It's all about the answers!

Ask a question

How to get ChangeSetHandles after phase 2 delivery, using java server side API?


Billy Brown (1113) | asked Nov 24 '15, 11:37 a.m.
   I'm trying to get the ComponentHandle after a phase 2 delivery from the IScmDeltaSource.  I noticed the operation date for a phase 1 delivery gives the DeliverOperationData  and you can the ChangeSetHandles from it. 
DeliverOperationData deliverOpData = (DeliverOperationData) data;
changeSetHandles = deliverOpData.getChangeSetHandles();

How can I achieve this for phase 2?  Ultimately, I would like to get the component/component name from the change.  

2 answers



permanent link
Chris McGee (50511117) | answered Nov 27 '15, 10:27 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
If you have IChangeSetHandles then you can fetch the IChangeSets from them. The IChangeSet will have a getComponent(), which returns an IComponentHandle. Similarly, if you fetch the IComponent from the handle you can get the component's current name.

I hope that this helps,
Chris

permanent link
Michele Pegoraro (1.8k12116103) | answered Nov 30 '15, 3:51 a.m.
Unfortunately is not so easy and linear as the phase 1 extension:
the operation.getOperationData() method returns an IScmDeltaSource instance. From this one you can use the method getDeltas() to obtain two object in an iterable: you have to catch the IChangeHistoryAddOperandDelta object that have a getAdditionalChangeSets method you can use to retrieves the change-set delivered.

Your answer


Register or to post your answer.