It's all about the answers!

Ask a question

How to get different versions of IFileItem?


Janani Vinayagam (11) | asked Nov 04, 4:33 a.m.

I need to calculate IFileItem size for different versions of it using java API. How to find its version?

One answer



permanent link
David Lafreniere (4.3k7) | answered Nov 06, 3:54 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

IFileItem.getContent().getSize()


Comments
Janani Vinayagam commented Nov 07, 1:16 a.m.

How to find its version. for ex, File A is modified for 5 times and each time the modifications were checked in. Now i need to retrieve the size for this 5 different modification.  


David Lafreniere commented Nov 07, 12:14 p.m. | edited Nov 07, 12:14 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
If you have a set of change sets containing the file you are interested in:
-IChangeSet.changes() gives IChange
-IChange.getAfterState() gives IVersionableHandle
-IVersionableManager.fetchCompleteState(IVersionableHandle) gives an IVersionable, and check if the instance is IFileItem (versus an IFolder for example)
-IFileItem.getContent().getSize()

Your answer


Register or to post your answer.