It's all about the answers!

Ask a question

Using RTC API how to get Stream name from Component and Repository name


Suresh P (1166) | asked Sep 13 '13, 12:48 a.m.

Hi,

I am using RTC -Eclipse Client 3.0.1 and  PlainJavaAPI 3.0.1.

I have RTC Component name and RTC Repository name for a project.

Now I need to get the Stream name of  that project.

Can you provide me details on RTC APIs used to get Stream name from Component and Repository names.

Thanks

Suri

One answer



permanent link
Andrew Niefer (7135) | answered Sep 17 '13, 11:55 a.m.
JAZZ DEVELOPER
edited Sep 17 '13, 11:57 a.m.
You want IWorkspaceManager.findWorkspacesContainingComponent
This searches for all workspace/streams that contain the component. Something like this:

	IWorkspaceSearchCriteria criteria = IWorkspaceSearchCriteria.FACTORY.newInstance();
	criteria.setKind(IWorkspaceSearchCriteria.STREAMS);
	IWorkspaceManager manager = SCMPlatform.getWorkspaceManager(repository);
	List< IWorkspaceHandle > workspaces = manager.findWorkspacesContainingComponent(component, criteria,  Integer.MAX_VALUE);

Your answer


Register or 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.