return new SiteBody(data.getStorageId());
default:
throw new AssertionError();
}
} else if (data instanceof ApplicationData) {
ApplicationData applicationData = (ApplicationData) data;
ApplicationType type = applicationData.getType();
if (ApplicationType.PORTLET == type) {
return Application.createPortletApplication((ApplicationData<Portlet>) applicationData);
} else if (ApplicationType.GADGET == type) {
return Application.createGadgetApplication((ApplicationData<Gadget>) applicationData);
} else if (ApplicationType.WSRP_PORTLET == type) {