EnumWikipedia wiki, Page page, Integer namespace,
List<Page> knownPages,
boolean redirects, boolean disambigNeeded)
throws APIException {
ApiLinksResult result = new ApiXmlLinksResult(wiki, httpClient);
ApiLinksRequest request = new ApiLinksRequest(wiki, result);
boolean useDisambig = wiki.getConfiguration().getBoolean(
WPCConfigurationBoolean.DAB_USE_DISAMBIG_MAGIC_WORD);
List<Page> redirections = redirects ? new ArrayList<Page>() : null;
request.loadLinks(page, namespace, knownPages, redirections, useDisambig);
// TODO: Better management of redirections (class)
if ((redirections != null) && !redirections.isEmpty()) {
initializeDisambiguationStatus(wiki, redirections, true);
retrieveContentsWithoutRedirects(wiki, redirections);