/** @return */ public List<PageInfo> loadPages() { String[] pageNames = wikiClient.getPageNames(); List<PageInfo> pages = new ArrayList<PageInfo>(); for (int i = 0; i < pageNames.length; i++) { String pageName = pageNames[i]; pages.add(loadPageVersion(pageName)); } return pages; }
public String[] getPageNames() { String[] wikiPages = wikiClient.getPageNames(); String[] cachedNames = diskCache.getCachedPageNames(server.getId()); Set<String> pageNamesList = new HashSet<String>(); pageNamesList.addAll(Arrays.asList(wikiPages)); pageNamesList.addAll(Arrays.asList(cachedNames)); String[] pageNames = pageNamesList.toArray(new String[pageNamesList.size()]); Arrays.sort(pageNames); return pageNames; }