Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

loading a workspace using java api instead of using scm load

Can I load a workspace using java api instead of using scm load

1 vote


Accepted answer

Permanent link
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

2 votes

Comments

Do you have a coding example?

       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);
       loadOp.run(monitor);
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?

1 vote

You could follow https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/ to set up an API development environment and then follow https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ and just use JavaSearch to find examples in the SDK.

 After loading you should also deregister the sandbox right?

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

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

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 1,202
× 411
× 57

Question asked: Jun 19 '13, 11:55 a.m.

Question was seen: 6,578 times

Last updated: May 30 '16, 10:34 a.m.

Confirmation Cancel Confirm