Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

snapshot loading via API

Hello,
I could able to get the list of snapshot for the stream,.But i dont know how to load snapshot using snapshot name or UUID.
private static List<IBaselineSetHandle> getSnapShotsOfAboveStream(final IWorkspaceHandle workspaceHandle,
      final ITeamRepository repository)
      throws TeamRepositoryException {

    IWorkspaceManager workspaceManager = SCMPlatform.getWorkspaceManager(repository);
    IBaselineSetSearchCriteria searchCriteria = IBaselineSetSearchCriteria.FACTORY.newInstance();
    searchCriteria.setOwnerWorkspaceOptional(workspaceHandle);

    List findBaselineSets = workspaceManager.findBaselineSets(searchCriteria, Integer.MAX_VALUE, monitor);
    for (Object object : findBaselineSets) {
      IBaselineSetHandle baselineSet = (IBaselineSetHandle) object;
      UUID itemId = baselineSet.getItemId();
     
      SnapshotMetadata instance2 = SnapshotMetadataFactory.getInstance(itemId.getUuidValue(), repository, monitor);
}


Based on snapshot info how i do loading into my local path

0 votes


Accepted answer

Permanent link

 How do you do that using the client?


  1. You create a repository workspace from the snapshot 
  2. Then you load the repository workspace.

Boopathy Nagaraj selected this answer as the correct answer

0 votes

Comments

Thanks. For creating repository from the snapshot, do we have API?

Yes there is API.
See IWorkspaceManager.createWorkspace(...)

1 vote

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,979

Question asked: Jul 02 '19, 5:00 a.m.

Question was seen: 1,178 times

Last updated: Jul 02 '19, 1:17 p.m.

Confirmation Cancel Confirm