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

Java API to fetch baselines of a component w.r.t to a perticular stream.

Hello,

I need to fetch only those baseline details of a component which are part of a particular stream. In the below code I am getting complete set of baselines history for a component which is shared among different streams.
I want to limit the result by filtering it by stream name.

workspaceManager.findBaselines(IBaselineSearchCriteria.FACTORY.newInstance().setComponentRequired(component), Integer.MAX_VALUE, newChild);

Requesting you to please provide plain Java API to achieve this.

Regards,
Swapnil

0 votes



One answer

Permanent link

Reverse your thinking: the component has no idea where its change sets and baselines are being used. The stream does.

Obtain the Stream handle (basically IFlowNodeConnection ; it is the same object for a Workspace).
Then call IFlowNodeConnection#getComponents , iterate over result until you find the component handle you are looking for. Use that handle as input for:
IFlowNodeConnection#getBaselinesInHistory(IComponentHandle component , int max, IProgressMonitor monitor )

Look at the returned IHistoricBaselineIterator in the SDK doc to see how you can getBaselines and use hasPrevious and getPrevious to get the whole list of baselines this component has in this stream.

If this answers your question please mark it as accepted.
- Arne


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
× 411
× 89
× 84
× 79

Question asked: Nov 02 '17, 3:03 a.m.

Question was seen: 2,994 times

Last updated: Nov 02 '17, 5:24 a.m.

Confirmation Cancel Confirm