// Use categories if possible
List<Page> dabCategories = wiki.getConfiguration().getDisambiguationCategories();
if ((dabCategories != null) && (dabCategories.size() > 0)) {
ApiCategoriesResult result = new ApiXmlCategoriesResult(wiki, httpClient);
ApiCategoriesRequest request = new ApiCategoriesRequest(wiki, result);
request.setDisambiguationStatus(pages);
return;
}
// Use templates otherwise
ApiTemplatesResult result = new ApiXmlTemplatesResult(wiki, httpClient);
ApiTemplatesRequest request = new ApiTemplatesRequest(wiki, result);
request.setDisambiguationStatus(pages);
}
}