if (source.getType() == null || source.getWidgetUrl() == null) {
updateRegionWidget(source);
}
RegionWidgetRenderer renderer = supportedApiWidgets.get(source.getType());
if (renderer == null) {
throw new NotSupportedException(source.getType() + " is not supported");
}
return renderer.prepareForRender(source);
}