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

handle to a snapshot

Hi,

Using

IWorkspaceManager wm = SCMPlatform.getWorkspaceManager(repo);

IWorkspaceSearchCriteria crit1 = IWorkspaceSearchCriteria.FACTORY.newInstance();
crit1.setPartialNameIgnoreCase("PRO");
crit1.setKind(IWorkspaceSearchCriteria.ALL);

try {
List<IWorkspaceHandle> handles = wm.findWorkspaces(crit1, Integer.MAX_VALUE, null);
}
catch (TeamRepositoryException e) { e.printStackTrace(); }


I am able to get a handle to a workspace or stream based on a name. Does something similar exist for snapshots or do I need to get the snapshots based on the found the workspace/stream and then compare its name to a searchstring?

Regards,
Bernd.

				

0 votes



2 answers

Permanent link
Snapshots are represented as IBaselineSet.

IBaselineSetSearchCriteria criteria = IBaselineSetSearchCriteria.FACTORY.newInstance();
criteria.setExactName("MySnapshot");
List<IBaselineSetHandle> snapshots = wm.findBaselineSets(criteria, Integer.MAX_VALUE, null);

Hi,

Using

IWorkspaceManager wm = SCMPlatform.getWorkspaceManager(repo);

IWorkspaceSearchCriteria crit1 = IWorkspaceSearchCriteria.FACTORY.newInstance();
crit1.setPartialNameIgnoreCase("PRO");
crit1.setKind(IWorkspaceSearchCriteria.ALL);

try {
List<IWorkspaceHandle> handles = wm.findWorkspaces(crit1, Integer.MAX_VALUE, null);
}
catch (TeamRepositoryException e) { e.printStackTrace(); }


I am able to get a handle to a workspace or stream based on a name. Does something similar exist for snapshots or do I need to get the snapshots based on the found the workspace/stream and then compare its name to a searchstring?

Regards,
Bernd.

0 votes


Permanent link
Hi,
I am working on developing a perl script using xml to modfify the clearquest database.
Could you please tell me what is the oslc command for creating/cloning SPRs ? I am already using oslc_cm.query and oslc_cm.properties. And how to I get the scheme of OSLC. PLease help me.

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

Question asked: Jun 17 '10, 6:36 a.m.

Question was seen: 6,480 times

Last updated: Jun 17 '10, 6:36 a.m.

Confirmation Cancel Confirm