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

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

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?

0 votes


Accepted answer

Permanent link

 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

0 votes


One other answer

Permanent link

Thanks Ralph - you're a lifesaver yet again.

0 votes

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
× 10,936

Question asked: Apr 24 '17, 6:39 a.m.

Question was seen: 2,023 times

Last updated: Apr 24 '17, 7:06 a.m.

Confirmation Cancel Confirm