It's all about the answers!

Ask a question

Problem creating new repository workspace client

Yehiel Glass (25538986) | asked Nov 04 '13, 11:19 a.m.
retagged Dec 16 '13, 4:15 p.m. by David Lafreniere (4.8k7)


When I create new repository workspace (client side), the workspace is created but without component.

What am I missing?

IWorkspaceConnection myNewWKSP = wm.createWorkspace(LogedInUser, "pluginWorkspace", "Merge detector" , monitor);



Yehiel Glass commented Nov 11 '13, 11:32 a.m.

Hi ,

I thoght to copy the workspace, but I don't know what is the parameter for IAuditableHandle :

Open Declaration arg0, IWorkspaceConnection arg1, String arg2, String arg3, IProgressMonitor arg4)

Maybe you know what is the IAuditableHandle arg0 ?

Accepted answer

permanent link
Sonia Dimitrov (27159) | answered Dec 17 '13, 1:01 p.m.
One possibility to create a new workspace from an existing one is to call:, String, String, IWorkspaceConnection, IWorkspaceConnection, IProgressMonitor). 

The first IWorkspaceConnection parameter represents your flow target,  the second represents the workspace you wish to copy.

With the original call posted here, you would need to explicitly add components with, boolean) and, IProgressMonitor).
      List<IComponentAdditionOp> componentOps = new ArrayList<IComponentAdditionOp>(components.size());
      componentOps.add(myNewWKSP.componentOpFactory().addComponent(components.get(0), false));
      myNewWKSP.applyComponentOperations(componentOps, monitor);

Yehiel Glass selected this answer as the correct answer

Your answer

Register or to post your answer.