how to create repository workspace from snapshot ??
Accepted answer
See:
IWorkspaceManager.createWorkspace(
IContributorHandle scopeHandle,
String workspaceName,
String description,
IBaselineSetHandle sourceBaselineSet,
IProgressMonitor progressMonitor)
IContributorHandle scopeHandle,
String workspaceName,
String description,
IBaselineSetHandle sourceBaselineSet,
IProgressMonitor progressMonitor)
Note: We have API to create a workspace from a snapshot, but not for creating a stream from a snapshot... you'd have to write more steps to do this (the steps are exactly what Ralph suggested), but see the answer in: https://jazz.net/forum/questions/239886/how-to-create-a-stream-from-a-snapshot-programatically
Also see Ralph's suggestion which gives you the tools to look up this information from the various Eclipse RTC actions.
One other answer
There are tools available that allow to understand the class that is called for actions in the Eclipse UI. That way, you can basically look into the RTC Eclipse client and what it does. For example see https://rsjazz.wordpress.com/2014/02/21/adding-context-menus-for-jazz-objects-to-the-rtc-eclipse-client/ for some hints.
Other than that my best guess what goes on.
The tool will have to
- Create a repository workspace
- Access the snapshot and get the components and the baselines referenced in the baseline set (snapshot)
- For each component baseline
- Add the component with the baseline set to the repository workspace
https://rsjazz.wordpress.com/2013/09/24/managing-workspaces-streams-and-components-using-the-plain-java-client-libraries/ and the related posts show some of the basic API involved.