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

Find the owner of Stream/Workspace?

 Hi,

I was able to get the owner of the workspace of Workspace in the form of IAuditable. From this I was unable to get the exact details of the Owner.
When I print the Iauditable I was able to see the Owner details but could not find a way to retrieve them.
	IAuditable auditable = (IAuditable) teamRepository.itemManager().fetchCompleteItem(workspace.getOwner(), ItemManager.DEFAULT, null);
	Result of auditable: Proxy of com.ibm.team.repository.common.model.impl.ContributorImpl@6eb86eb8 (stateId: [UUID _pCLZGMQoEeOLPN1C2eKPUA], itemId: [UUID _W3wF8DBtEeOKsasJJzRA4g], origin: com.ibm.team.repository.client.internal.TeamRepository@2b212b21, immutable: true) (contextId: [UUID _8lNyYNwSEd2pIJ5QVwgQGg], modified: 2014-04-15 01:00:58.275, workingCopy: <unset>) (mergePredecessor: null, workingCopyPredecessor: <unset>, workingCopyMergePredecessor: <unset>, predecessor: [UUID _pCKyAsQoEeOLPN1C2eKPUA]) (emailAddress: vijayreddy.gaddam@gmail.com, userId: vgdxwr1, name: Vijay Reddy Gaddam, archived: false)
Could anyone please let me know the way?

Thanks and Regards,
Vijay Reddy.

0 votes


Accepted answer

Permanent link
 Hi,

Finally I found the soultion, Instead of using the IAuditable, I type casted it(workspace.getOwner()) to a contributor and then got the result.

	IContributor contributor = (IContributor) teamRepository.itemManager().fetchCompleteItem((IContributorHandle)workspace.getOwner(), ItemManager.DEFAULT, null);

Thanks and Regards,
Vijay Reddy
Ralph Schoon selected this answer as the correct answer

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,927
× 12

Question asked: Feb 20 '15, 1:23 a.m.

Question was seen: 2,737 times

Last updated: Feb 20 '15, 4:23 a.m.

Related questions
Confirmation Cancel Confirm