It's all about the answers!

Ask a question

Find the owner of Stream/Workspace?

Vijay Reddy Gaddam (562641) | asked Feb 20 '15, 1:23 a.m.
edited Feb 20 '15, 4:23 a.m.

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 (stateId: [UUID _pCLZGMQoEeOLPN1C2eKPUA], itemId: [UUID _W3wF8DBtEeOKsasJJzRA4g], origin:, 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:, userId: vgdxwr1, name: Vijay Reddy Gaddam, archived: false)
Could anyone please let me know the way?

Thanks and Regards,
Vijay Reddy.

Accepted answer

permanent link
Vijay Reddy Gaddam (562641) | answered Feb 20 '15, 4:21 a.m.
edited Feb 20 '15, 4:23 a.m.

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

Your answer

Register or to post your answer.