how to convert IVersionable to IShareable/IResource
hi,
I get a list of IVersionable from the repository and would like to get their corresponding local information like the IPath of a resource, etc. One way might be to get their IShareable/IResource. But it seems we couldn't not simply adapt back to them.
What is a decent way to get the local information such as local IPath from a IVersionable?
Thanks for any info,
Owen
I get a list of IVersionable from the repository and would like to get their corresponding local information like the IPath of a resource, etc. One way might be to get their IShareable/IResource. But it seems we couldn't not simply adapt back to them.
What is a decent way to get the local information such as local IPath from a IVersionable?
Thanks for any info,
Owen
One answer
jingweno wrote:
ISharingManager sm = FileSystemCore.getSharingManager()
IShareable shareable = sm.findShareable(cfaRoot, versionableHandle,
componentHandle, contextHandle, progressMonitor);
cfaRoot is the root of the copy file area, if you are using eclipse then
you can easily get it from ISharingManager.getDefaultCFARoot()
IPath localPath = shareable.getLocalFullPath();
hi,
I get a list of IVersionable from the repository and would like to get
their corresponding local information like the IPath of a resource,
etc. One way might be to get their IShareable/IResource. But it seems
we couldn't not simply adapt back to them.
What is a decent way to get the local information such as local IPath
from a IVersionable?
Thanks for any info,
Owen
ISharingManager sm = FileSystemCore.getSharingManager()
IShareable shareable = sm.findShareable(cfaRoot, versionableHandle,
componentHandle, contextHandle, progressMonitor);
cfaRoot is the root of the copy file area, if you are using eclipse then
you can easily get it from ISharingManager.getDefaultCFARoot()
IPath localPath = shareable.getLocalFullPath();