String type = publisher.getType();
if (notificationUpgrades == null) {
log.error("No upgrader");
}
NotificationsUpgrade upgrade = notificationUpgrades.get(type);
if(upgrade == null) {
log.error("No upgrader for publisher: " + publisher.getType());
return null;
}
log.audit("upgrading..."+upgrade.getClass().getName());
return upgrade.ugrade(publisher);
}