log4j2 #1
|
@ -72,6 +72,7 @@ public class CommunityController {
|
||||||
subscriberService.updatePid(old_pid, new_pid);
|
subscriberService.updatePid(old_pid, new_pid);
|
||||||
layoutService.updatePid(old_pid, new_pid);
|
layoutService.updatePid(old_pid, new_pid);
|
||||||
notificationsService.updatePid(old_pid, new_pid);
|
notificationsService.updatePid(old_pid, new_pid);
|
||||||
|
menuService.updatePid(old_pid, new_pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
return portalResponse;
|
return portalResponse;
|
||||||
|
|
|
@ -2,6 +2,7 @@ package eu.dnetlib.uoaadmintools.services;
|
||||||
|
|
||||||
import eu.dnetlib.uoaadmintools.dao.MenuDAO;
|
import eu.dnetlib.uoaadmintools.dao.MenuDAO;
|
||||||
import eu.dnetlib.uoaadmintools.dao.MenuItemDAO;
|
import eu.dnetlib.uoaadmintools.dao.MenuItemDAO;
|
||||||
|
import eu.dnetlib.uoaadmintools.entities.Notifications;
|
||||||
import eu.dnetlib.uoaadmintools.entities.menu.*;
|
import eu.dnetlib.uoaadmintools.entities.menu.*;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
|
||||||
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
|
||||||
|
@ -372,4 +373,14 @@ public class MenuService {
|
||||||
|
|
||||||
return menuDAO.save(menu);
|
return menuDAO.save(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updatePid(String old_pid, String new_pid) {
|
||||||
|
log.debug("menu service: updatePid");
|
||||||
|
Menu menu = menuDAO.findByPortalPid(old_pid);
|
||||||
|
if(menu != null) {
|
||||||
|
menu.setPortalPid(new_pid);
|
||||||
|
menuDAO.save(menu);
|
||||||
|
log.debug("menu saved!");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue