It's all about the answers!

Ask a question

Java API to get the baselineHandler from baselineName and BaselineId.


sowmya M (19110) | asked Nov 20 '18, 5:53 a.m.
Hi All,

How do i get the baselineHandler from baselineName and BaselineId using java API.

Thankyou.

Comments
David Lafreniere commented Nov 21 '18, 4:59 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

What do you mean by 'baselineHandler'?


Shashikant Padur commented Nov 21 '18, 10:41 p.m.
JAZZ DEVELOPER
I guess the question is how to get the IBaseline object. If so, you could do the following to fetch based on baseline id:
IItemHandle baselineHandle = IBaseline.ITEM_TYPE.createItemHandle(baselineId, null);
IBaseline baseline = (IBaseline) repo.itemManager().fetchCompleteItem(baselineHandle, IItemManager.DEFAULT, null);
where repo is your ITeamRepository object.

To fetch based on baseline name:
IWorkspaceManager.findBaselines(IBaselineSearchCriteria criteria, ...)
In the criteria you can specify the name and whether it should be an exact match or not.

Be the first one to answer this question!


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.