It's all about the answers!

Ask a question

handle to a snapshot


Bernd van Oostrum (21724565) | asked Jun 17 '10, 6:36 a.m.
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.

                            

2 answers



permanent link
Shashikant Padur (4.2k27) | answered Jun 18 '10, 12:50 a.m.
JAZZ DEVELOPER
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.

permanent link
Jayaprasad Rao (6) | answered Apr 06 '11, 2:39 a.m.
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.

Your answer


Register or to post your answer.