Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Fetching SCM data from Jazz

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.

0 votes



One answer

Permanent link
"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.

0 votes

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Jul 23 '07, 8:23 p.m.

Question was seen: 9,130 times

Last updated: Jul 23 '07, 8:23 p.m.

Confirmation Cancel Confirm