}
if (restProvider.equals(XWIKI)) {
return new IndexFromXWiki(restUsername, restPassword);
}
if (restProvider.equals(CONFLUENCE)) {
return new IndexFromConfluence(restUsername, restPassword);
}
throw new RuntimeException("Unsupported ResourceIndexer provider " + restProvider);
}