Пример #1
0
 /** @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;
 }
Пример #2
0
  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;
  }