It's all about the answers!

Ask a question

Get Workspace of Component


Yung-Hsiang Chan (34713) | 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 (1872029) | 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 (1872029) | 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.