RTC 6.0: how to get workSpace owned/created by user in Plan Java API
Accepted answer
Hey I got the answer. Here is the code for getting workspaces for exact owner.It might help someone :)
//Set the criteria for workspace
IWorkspaceSearchCriteria workspaceCriteria = IWorkspaceSearchCriteria.FACTORY.newInstance();
workspaceCriteria.setKind(IWorkspaceSearchCriteria.WORKSPACES);
//getting workspaces of exact owner.
workspaceCriteria.setExactOwnerName(repository.loggedInContributor().getName());
List<IWorkspaceHandle> workspaceList;
workspaceList = mgr.findWorkspaces(workspaceCriteria, Integer.MAX_VALUE, null);
Stream workspaceObj = null;
@SuppressWarnings("unchecked")
List<IWorkspace> iWorkspaces = repository.itemManager().fetchCompleteItems(workspaceList, IItemManager.DEFAULT, null);
One other answer
I would suggest to look into https://rsjazz.wordpress.com/2013/09/24/managing-workspaces-streams-and-components-using-the-plain-java-client-libraries/ and to enhance the seach criteria for the owner.