client SDK - IWorkspace from IFileItemHandle
Hi,
Given an opened file, I'd like to retrieve the RTC Repository Workspace it is based on.
Can anyone share how to do this using the client SDK?
Regards,
Bernd.
|
Accepted answer
IShareable shareable = FileSystemCore.getSharingManager().findShareable(fullPath, ResourceType.FILE);
IShare share = shareable.getShare();
ISharingDescriptor sharingDescriptor = share.getSharingDescriptor();
IWorkspaceHandle workspaceHandle = (IWorkspaceHandle) sharingDescriptor.getConnectionHandle();
Bernd van Oostrum selected this answer as the correct answer
|
2 other answers
Ralph Schoon (63.1k●3●36●45)
| answered Dec 02 '19, 6:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Bernd,
please provide more context.
|
Hi Ralph,
The plugin I'm working on will check for a file in the sandbox (= based on the development-stream), if it matches the version from the production stream. If not, the plugin will notify the developer as it means the version he will start working on has been changed in the current release, by someone else.
As a start, I need to know from which stream the IFileItemHandle is derived (= the file is opened in the sandbox, but to which repository workspace is it connected?)
I could also check all streams for the file and then compare them (which is what I have implemented now as a workaround), but that's the other way around. I want to start from the opened file...
Best regards,
Bernd.
|
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.