It's all about the answers!

Ask a question

how to create the components programatically under the given stream using client libraries??


vinitha dsouza (1211259) | asked Jul 13 '17, 9:50 a.m.

Hello

I want to create the component under the given Stream programmatically  using client libraries in java ??

please let me know if you have any  code snippet for the same ??

Accepted answer


permanent link
Shashikant Padur (4.2k27) | answered Jul 14 '17, 4:42 a.m.
JAZZ DEVELOPER
edited Jul 14 '17, 4:42 a.m.
IComponent comp = IWorkspaceManager#createComponent(compName, processArea, progressMonitor)
IComponentAdditionOp compOp = IWorkspaceConnection#componentOpFactory().addComponent(comp, false)
IWorkspaceConnection#applyComponentOperations(compOp, false, progressMonitor)
<style type="text/css"> p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} </style>
vinitha dsouza selected this answer as the correct answer

Comments
vinitha dsouza commented Jul 14 '17, 4:48 a.m.

Hello
Thank for the reply .I have one doubt here ..how can we create the component under the stream ???
Do we have to create repository workspace to stream and deliver the component???


Shashikant Padur commented Jul 14 '17, 6:43 a.m. | edited Jul 14 '17, 6:45 a.m.
JAZZ DEVELOPER

IWorkspaceConnection is either a workspace or a stream and so you can add the component to the stream.

One other answer



permanent link
Ralph Schoon (59.0k23642) | answered Jul 14 '17, 4:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

More examples can be found here: https://rsjazz.wordpress.com/2013/09/24/managing-workspaces-streams-and-components-using-the-plain-java-client-libraries/

No, like in the UI, you can basically create a stream using component baselines.

Your answer


Register or to post your answer.