It's all about the answers!

Ask a question

loading a workspace using java api instead of using scm load

K M (38325251) | asked Jun 19 '13, 11:55 a.m.
edited May 30 '16, 10:34 a.m. by David Lafreniere (4.8k7)
Can I load a workspace using java api instead of using scm load

Accepted answer

permanent link
Tim Mok (6.6k38) | answered Jun 20 '13, 11:47 a.m.
You could try using IOperationFactory.instance.getLoadOperation(dilemmaHandler) to get your load operation. You'll have to create your own dilemma handler.
Ralph Schoon selected this answer as the correct answer

K M commented Jun 21 '13, 8:05 a.m. | edited Jun 21 '13, 8:50 a.m.

Do you have a coding example?

Tim Mok commented Jun 21 '13, 9:14 a.m.

       ILoadOperation loadOp = IOperationFactory.instance.getLoadOperation(new LoadDilemmaHandler() {
           // override any dilemmas where you want more specific input from the user
      ISharingManager sharingManager = FileSystemCore.getSharingManager();
       loadOp.requestLoad(sandbox, relativeLocation, workspaceConnection, component, versionables);;
This is the basic part of getting a load operation and running it. You would have to write the part of getting the versionables that you want to load. You can use the sharing manager to create and register the a sandbox. The relative location is relative to the sandbox and can be null to load in the sandbox root.

A lot of what you want to do here would be reimplementing internal code but I don't know how complex or simple you want this implementation to be. What is the reason that you don't want to write a script using the command line?

Ralph Schoon commented Jun 21 '13, 9:15 a.m.

You could follow to set up an API development environment and then follow and just use JavaSearch to find examples in the SDK.

Stefano Antoniazzi commented May 17 '16, 10:49 a.m.

 After loading you should also deregister the sandbox right?

Without deregistering I see a .jazzlock hanging around...

Ralph Schoon commented May 17 '16, 10:52 a.m.

I am certain there are different answers dependent on what you want to do.

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.