It's all about the answers!

Ask a question

Changeing Baseline of Component.


K M (38325251) | asked Apr 21 '10, 11:01 a.m.
Is there a class in the API which will change the baseline of a component within a stream?

2 answers



permanent link
K M (38325251) | answered Apr 22 '10, 1:51 p.m.
IBaselineHandle baseline = (IBaselineHandle) it.next();
IBaseline baseline_comp = (IBaseline)repo.itemManager().fetchCompleteItem(baseline, IItemManager.DEFAULT, MONITOR);
IBaselineConnection baseConnection = wm.getBaselineConnection(baseline_comp,MONITOR);

// Replace Baseline
clone_stream.replaceComponent(component,baseConnection,false,true,MONITOR);

permanent link
Nick Edgar (6.5k711) | answered Apr 22 '10, 2:17 p.m.
JAZZ DEVELOPER
See replaceComponent(IComponentHandle, IConnection, boolean, IProgressMonitor) on com.ibm.team.scm.client.IFlowNodeConnection.

IFlowNodeConnection is the supertype of IWorkspaceConnection, which represents a workspace or stream.

The 2nd arg, IConnection, should be an IBaselineConnection, which can be obtained via:
getBaselineConnection(IBaselineHandle, IProgressMonitor)
on IWorkspaceManager.

See also its findBaselines(IBaselineSearchCriteria, int, IProgressMonitor) method.

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.