It's all about the answers!

Ask a question

Get Workspace of Component


Yung-Hsiang Chan (34913) | asked Nov 20 '14, 1:11 a.m.
Hi, I want to ask how to get the workspace of a given component?

Do I need to use IWorkspaceSearchCriteria to query it? Or is there any simpler API I can use?

Thanks!

Accepted answer


permanent link
Atul Kumar (1872329) | answered Nov 20 '14, 7:27 a.m.
See, if this helps:


IWorkspaceSearchCriteria
criteria = IWorkspaceSearchCriteria.FACTORY.newInstance(); criteria.setKind(IWorkspaceSearchCriteria.STREAMS); IWorkspaceManager manager = SCMPlatform.getWorkspaceManager(repository); List< IWorkspaceHandle > workspaces = manager.findWorkspacesContainingComponent(component, criteria, Integer.MAX_VALUE);
Yung-Hsiang Chan selected this answer as the correct answer

One other answer



permanent link
Atul Kumar (1872329) | answered Nov 20 '14, 7:29 a.m.
You may refer to these articles for reference:

  • https://jazz.net/library/article/1229
  • https://rsjazz.wordpress.com/2013/09/24/managing-workspaces-streams-and-components-using-the-plain-java-client-libraries/

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.