It's all about the answers!

Ask a question

Fetching SCM data from Jazz


Patrick Wagstrom (17266) | asked Jul 23 '07, 8:23 p.m.
I'm trying to write a plugin for Jazz that computes some metrics from the Jazz SCM hooked up to a repository. I've managed to successfully get it so I can get a repository object and get a list of the project areas and team areas, but I haven't been able to get a list of the components or workspaces. Here's what I've tried:

IWorkspaceManager m = SCMPlatform.getWorkspaceManager(repository);

/* should return components, but returns empty list */
List<IComponentHandle> l = m.knownComponents();

/* should return known workspaces, but returns empty list */
List<IWorkspaceConnection> wclist = m.knownWorkspaceConnections();

Am I on the right track here? Or should I try to get at the SCM data through project or team area objects?

Thanks in advance.

One answer



permanent link
John Camelon (1.7k14) | answered Jul 23 '07, 9:05 p.m.
JAZZ DEVELOPER
"Known" properties of the workspace manager are just elements that the
manager is aware about in its caches, as the result of executing other
queries on behalf of clients. Its more for a quick lookup to help UI
code populate dialog pickers without contacting the server.

For this query, you can call IWorkspaceManager#findComponents()
with an empty string for the namePattern.

Hope this helps,
JohnC

pwagstro wrote:
I'm trying to write a plugin for Jazz that computes some metrics from
the Jazz SCM hooked up to a repository. I've managed to successfully
get it so I can get a repository object and get a list of the project
areas and team areas, but I haven't been able to get a list of the
components or workspaces. Here's what I've tried:

IWorkspaceManager m = SCMPlatform.getWorkspaceManager(repository);

/* should return components, but returns empty list */
List<IComponentHandle> l = m.knownComponents();

/* should return known workspaces, but returns empty list */
List<IWorkspaceConnection> wclist =
m.knownWorkspaceConnections();

Am I on the right track here? Or should I try to get at the SCM data
through project or team area objects?

Thanks in advance.

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.