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.
Vijay Reddy.
Accepted answer
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
Vijay Reddy