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?
Accepted answer
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.