It's all about the answers!

Ask a question

RTC 6.0: how to get workSpace owned/created by user in Plan Java API

Jayshri Burde (2818) | asked Feb 01 '17, 6:55 a.m.

 Hi All ,

I am able to get list of all the work spaces but i need filter out for all the work spaces owned/created by perticular/current user. Any help would greatly appreciated. 

Accepted answer

permanent link
Jayshri Burde (2818) | answered Feb 24 '17, 5:47 a.m.
  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();
//getting workspaces of exact owner.
List<IWorkspaceHandle> workspaceList;
workspaceList = mgr.findWorkspaces(workspaceCriteria, Integer.MAX_VALUE, null);
Stream workspaceObj = null;
           List<IWorkspace> iWorkspaces = repository.itemManager().fetchCompleteItems(workspaceList,       IItemManager.DEFAULT, null);
Ralph Schoon selected this answer as the correct answer

One other answer

permanent link
Ralph Schoon (63.3k33646) | answered Feb 01 '17, 7:47 a.m.

 I would suggest to look into and to enhance the seach criteria for the owner.

Jayshri Burde commented Feb 24 '17, 5:48 a.m.

 Thanks Ralph for your quick response.

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.