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

How to get the file items from the component's baseline part of a Snapshot programatically ?

Hello All,

I have a scenario wherein I need to get all the file item versions part of the Component baseline directly instead getting the files from the Changeset.

Why I require this : In a given snapshot, a single file can be part of multiple CSs. I finally need the file versions of that file, part of this snapshot, for my further logics. So if i traverse from CS, i will get the file item, but its version might be one.

Are there any APIs, that I can get the File item information directly from the Component Baseline, instead of going through the CSs and then fetching the files ? OR is there any other way to get all the file versions of a file part of snapshot ?

 Request you to assist on this.

Thank you.


0 votes



One answer

Permanent link
Instead of inspecting the change sets to get the files, you can get the baseline configuration (which is basically the full folder/file tree at the time the baseline was created)
See:
IConfiguration configuration = IBaselineConnection.configuration()
You can then traverse the file tree using:
   configuration.childEntriesForRoot(IProgressMonitor monitor)
and recursive calls of:
   configuration.childEntries(List folderHandles, IProgressMonitor monitor)


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,963
× 1,204
× 84

Question asked: May 22 '18, 12:38 a.m.

Question was seen: 2,652 times

Last updated: Jun 01 '18, 2:41 p.m.

Confirmation Cancel Confirm