It's all about the answers!

Ask a question

Get IFileItems from plain java source file


ioana lazar (9910) | asked Jul 24 '12, 3:54 a.m.
  Hello. How can I get a IFileItem object for a certain source file from my repository? I'm looking for the solution into the api but I can't find out how to do that using the Java Plain Client Libraries. Thanks

One answer



permanent link
Andrew Niefer (7135) | answered Jul 24 '12, 2:46 p.m.
JAZZ DEVELOPER
From your other other question, if you have the IShareable for the file, then <tt>IShareable.getVersionable(monitor)</tt> gives you an IVersionableHandle which can be passed to
<tt>IItemManager#fetchCompleteItem(IItemHandle, int, IProgressMonitor)</tt> to get the full IFileItem.

You can get an ITeamRepository using <tt>RepositoryUtils.getTeamRepository(sharingDescriptor)</tt>, and then <tt>ITeamRepository.itemManager()</tt> give you the item manager.


Comments
ioana lazar commented Jul 25 '12, 3:07 p.m.

Hey. I can't get the IShareable object. I get a null reference for it.

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.