It's all about the answers!

Ask a question

Java API - how to add a non-empty folder to a component?


Cliff Gardiner (921134) | asked Apr 24 '17, 6:39 a.m.

Hello, I'm trying to automate a process that sets up RSA users in a standard manner but I'm struggling to understand how to add a populated Eclipse project (it's actually an 'empty' RSA model project containing a standard set of model elements) to a component.  The logic is:

  • Load template project from a stream in another project area
  • deregister the sandbox
  • rename the project folder
  • add to new component in new stream

It's the last bit I can't work out - I've created the stream, added the components, replaced with the correct baselines so the foundation is there but adding the renamed folder is the problem.  What I want is to achieve programmatically 'team -> share project .....'

Snippet2 shows creation of a new folder and adding a new file, but I haven't been able to modify this to work with a  pre-populated folder.

Can anyone steer me in the right direction?

Accepted answer


permanent link
Ralph Schoon (63.2k33646) | answered Apr 24 '17, 7:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 https://rsjazz.wordpress.com/2013/10/15/extracting-an-archive-into-jazz-scm-using-the-plain-java-client-libraries/ shares the content of a zip file. It does exactly what you want to do. 

Cliff Gardiner selected this answer as the correct answer

One other answer



permanent link
Cliff Gardiner (921134) | answered Apr 24 '17, 7:06 a.m.

Thanks Ralph - you're a lifesaver yet again.

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.