Create a stream using JAVA API
Sergio Lorente (98●1●7●12)
| asked Dec 26 '12, 7:53 a.m.
edited Oct 05 '17, 11:54 p.m. by David Lafreniere (4.8k●7) Hi,
It returns a beautiful classCastException at the fourth line.IComp src = wm.createComponent(name,projectArea,null); IBaselineHandle bh = src.getInitialBaseline(); IBaselineSetHandle intialBaselineSetHandle = (IBaselineSetHandle) IBaselineSet.ITEM_TYPE.createItemHandle(bh.getItemId,null); stream.addBaselineSet(intialBaselineSetHandle,null); Reading in jazz.net, somebody suggested to use that if u are using flows, but we are not using flows. I have tried in many other ways and i can not change my stream configuration using that addBaselineSet method. I found something similar in this place: jazzForum but it has no answer and i don't find nothing about IWorkSpaceUpdateOperation class in javadoc or jazzForum. Any suggestion? Best Regards, Sergio |
Accepted answer
IBaselineSetHandle refers to a snapshot, which is why you get a ClassCastException when casting the IComponent.
On your stream, you'll want to get the componentOpFactory to create your component operations that you'll apply on your stream: IComponentOp op = stream.componentOpFactory().addComponent(componentHandle, boolean); stream.applyComponentOperations(Collections.singletonList(op), monitor); David Lafreniere selected this answer as the correct answer
|
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.