public void save(DataStorage storage, UserPortalConfigService service) {
if (create) {
try {
PortalConfig existing = storage.getPortalConfig(portalConfig.getType(), portalConfig.getName());
if (existing != null) throw new EntityAlreadyExistsException("Cannot create site. Site " + id + " already exists.");
} catch (Exception e) {
throw new ApiException("Exception occurred checking if site already existed before creating site " + id, e);
}
// In order to properly create a site (which includes creating it from a template) it seemed much harder