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

How can I get changed content of modified file using RTC-SDK

When I deliver a changeset, I have get the changeset and IVersionable.

Now I want to get how to get the changed content of  file.

Below is source to get IVersionable :

 IVersionableHandle versionableHandle = change.afterState(); 
ServiceConfigurationProvider configProvider = ServiceConfigurationProvider.FACTORY.create(
       data.getDestWorkspace(), changeSet.getComponent()); 
IVersionable item = (IVersionable) scmService.fetchState(versionableHandle, null, null);

0 votes



One answer

Permanent link
 I do the following to download a file from the repository:


FileOutputStream outputFile = new FileOutputStream(destinationFile);
IConfiguration c = iWorkspaceConnection.configuration(componentHandle);
IFileItem fileItem = (IFileItem) c.fetchCompleteItem(versionableHandle, null); 
IFileContent content = fileItem.getContent();
IFileContentManager contentManager = FileSystemCore.getContentManager(iTeamRepository); 
contentManager.retrieveContent(fileItem, content, outputFile, null);

Hope this help you.

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: Nov 28 '12, 11:16 a.m.

Question was seen: 5,316 times

Last updated: Dec 05 '12, 5:36 a.m.

Confirmation Cancel Confirm