public List<SelectItem> getOlapReports() throws IOException { if (olapReports == null) { olapReports = new LinkedList<>(); addOlapReports(olapReports, repository.getRoot()); } return olapReports; }
private void addOlapReports(List<SelectItem> list, ReportFile parent) throws IOException { if (!(parent.isDirectory() || parent.isRoot())) list.add(new SelectItem(parent.getId(), parent.getName())); List<ReportFile> files = repository.getFiles(parent); for (ReportFile file : files) addOlapReports(list, file); }