It's all about the answers!

Ask a question

IContentService.retrieveContent


Michele Pegoraro (1.8k14119103) | asked Dec 16 '11, 1:47 p.m.
Hi,
I'm trying to retrive content from a versioned file in a follow up extension.
I have a problem using retrieveContent method: as on client side it accept IFileContent, on server side it only accept IContent and casting does not work.

Is there a way to get an IContent from an IFileContent?

Thanks,
Michele.

3 answers



permanent link
Michele Pegoraro (1.8k14119103) | answered Dec 20 '11, 6:41 a.m.
I've found a solution: use a different service.

The service I've found is IServerSideVersionedContentService with method fetchContent.

I don't understand very much why of this difference between client and server, I would expect to match IContentManager with IContentService instead of this specific class.

Michele.

permanent link
Michele Pegoraro (1.8k14119103) | answered Dec 19 '11, 10:54 a.m.
IFileItem javadoc says to use IFSContentManager, but I cannot find it...

permanent link
Kevin Mayfield (4358) | answered Feb 13 '13, 6:32 p.m.
I found the above information to be correct, but I needed more context.

See the answer provied to my AbstractScmAdvisor question:
https://jazz.net/forum/questions/102417/abstractscmadvisor-how-do-you-read-changed-file-content/102578


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.