It's all about the answers!

Ask a question

How to create handle objects?

Jeff Care (1.0k3633) | asked Mar 01 '11, 11:20 p.m.
I think this is a simple question but my google-fu is failing me.

Assume that I know the UUID for a particular repository object (IWorkspace in my current problem, but could be anything) do I create the proper IItemHandle subclass that refers to it?

Accepted answer

permanent link
Mehmet Ali Aydın (6133) | answered Mar 03 '11, 3:23 a.m.
Sample code:

String UUIDStr = "_nsXjlEVkEeCyA4xyic0frg";
UUID workspaceUuid = UUID.valueOf(UUIDStr);
IWorkspaceHandle workspaceHandle = (IWorkspaceHandle)IWorkspace.ITEM_TYPE.createItemHandle(workspaceUuid, null);
IWorkspace workspace = (IWorkspace)teamRepository.itemManager().fetchCompleteItem(workspaceHandle, 1, monitor);
Jeff Care selected this answer as the correct answer

Jeff Care commented Aug 17 '12, 10:18 a.m.

Awesome, thanks; that worked.

Your answer

Register or to post your answer.