Hi all,
I am trying to get all Universes (or more specifically the count of all Universes) in a folder. This means it has to count all univeses in that folder + all the universes in the sub folders + sub folders of the sub folders and such.
How can I do this?
I already have the code to get all the universes in the main folder:
IInfoObjects universeFolders = infoStore.query ("SELECT * FROM CI_APPOBJECTS WHERE SI_KIND='Folder' AND SI_PARENTID=501 Order by SI_NAME");
int universeCount = 0;
for (int i = 0; i < universeFolders.size(); i++)
{
IFolder universeFolder = (IFolder) universeFolders.get(i);
out.println("<tr><td>" + universeFolder.getTitle() + "</td>");
out.println("<td>" + universeFolder.getContents().size() + "</td></tr>");
universeCount += universeFolder.getContents().size();
}
Please let me know what I need to add to this to get all universes from the sub folders and the sub folders of those subfolders as well. Thank You