}
if (restProvider.equals(XWIKI)) {
return new LoadFromXWiki(Type.JSON, restUsername, restPassword);
}
if (restProvider.equals(CONFLUENCE)) {
return new LoadFromConfluence(restUsername, restPassword);
}
throw new RuntimeException("Unsupported ResourceLoader provider " + restProvider);
}