It's all about the answers!

Ask a question

How to programatically retrieve all repository file names of a component


Surya Raj (17216) | asked Aug 11 '15, 1:25 a.m.
edited May 24 '16, 9:44 p.m. by David Lafreniere (4.8k7)
Hello All,

Is it possible to get the repository file names of the component? from the below code I can only get the folder name. Can't get the child entries from that folder (Here i use SCM Java API)

    IConfiguration compConfig = workspaceConnection.configuration(compHandle);
    Map<String, IVersionableHandle> projectFolders = compConfig.childEntriesForRoot(null);
                       
    List<IVersionable> items = compConfig.fetchCompleteItems(new ArrayList<IVersionableHandle>        (projectFolders.values()), null);

Here, "items" returns only the folder name (like .rtcmetadata, Src) cant get child entries from the folder.

Please help me in this situation.

Thank you.

Accepted answer


permanent link
Chris McGee (50511117) | answered Oct 01 '15, 3:42 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
The returned items should have the correct subtype, such as IFolder. If it is an IFolder then you should be able to compute the children using compConfig.childEntries().

I hope that this helps,
Chris
David Lafreniere selected this answer as the correct answer

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.