Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes



One answer

Permanent link
jingweno wrote:
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();

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Aug 06 '08, 9:34 p.m.

Question was seen: 6,406 times

Last updated: Aug 06 '08, 9:34 p.m.

Confirmation Cancel Confirm