log4j2 #1

Merged
konstantina.galouni merged 3 commits from log4j2 into master 2023-05-03 12:14:51 +02:00
2 changed files with 12 additions and 0 deletions
Showing only changes of commit 43a4c1a5a4 - Show all commits

View File

@ -72,6 +72,7 @@ public class CommunityController {
subscriberService.updatePid(old_pid, new_pid);
layoutService.updatePid(old_pid, new_pid);
notificationsService.updatePid(old_pid, new_pid);
menuService.updatePid(old_pid, new_pid);
}
return portalResponse;

View File

@ -2,6 +2,7 @@ package eu.dnetlib.uoaadmintools.services;
import eu.dnetlib.uoaadmintools.dao.MenuDAO;
import eu.dnetlib.uoaadmintools.dao.MenuItemDAO;
import eu.dnetlib.uoaadmintools.entities.Notifications;
import eu.dnetlib.uoaadmintools.entities.menu.*;
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException;
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException;
@ -372,4 +373,14 @@ public class MenuService {
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!");
}
}
}