It's all about the answers!

Ask a question

JAVA API: how to retrieve owner name of repository workspace


Oscar Picasso (311420) | asked Jan 24 '14, 11:20 a.m.
Hi,

I have an IWorkspaceConnection that represents a repository workspace. How to get its owner name?

I have tried to cast workspaceConnection.getOwner() to IContributor but I get a class cast exception.
I also tried workspaceConnection.getOwner().getAdapter(IContributor.class) but the result is null.

Accepted answer


permanent link
Tim Mok (6.6k38) | answered Jan 24 '14, 12:01 p.m.
JAZZ DEVELOPER
IContributor represents the complete object of a user. The #getOwner() call returns a handle to the object. It either returns a ITeamAreaHandle or IContributorHandle.

You may want to look at Ralph Schoon's blog post about using the plain Java client API.
Oscar Picasso selected this answer as the correct answer

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.