It's all about the answers!

Ask a question

How to load a component from a RTC repository workspace to the local drive.Using JAVA API.


nanda S (201619) | asked Aug 05 '14, 2:25 a.m.

Hi

I am trying to load a component from a RTC repository workspace to the local drive.

I have used the below snippet..but it is not working.  

What are the values for : sandbox, relatLocation and versionable to be intitalized .

//Code starts here:

ILoadOperation loadOp = IOperationFactory.instance.getLoadOperation(new LoadDilemmaHandler() {

});

ISharingManager sharingManager = FileSystemCore.getSharingManager();

loadOp.requestLoad(sandbox, relatLocation, workspaceConnection, component, versionable); 

loadOp.run(monitor);

2 answers



permanent link
Ralph Schoon (63.1k33645) | answered Aug 05 '14, 4:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
There have been numerous discussions around this here. Try to look in one of the answers here: https://www.google.com/search?q=api+load+andbox+site%3Ajazz.net

I searched these results recently and there is a lot of example code.

Sandbox is a versioned location on the disk. RelatLocation is likely a relative path to the sandbox, versionable a versionable file. I think you want a different API call that just loads everything. I believe the code in some of the questions will help you out.

permanent link
Chris McGee (50511117) | answered Aug 05 '14, 8:42 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
The IOperationFactory is not API so it can change at any time. Also, it is undocumented.

If you want to automate the loading of components into a local sandbox your best bet is SCM CLI. You can invoke it using Java if you'd like. Also, there is a JSON output feature for many of the subcommands to make it easier to parse the output.

https://jazz.net/library/article/1031

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.