PageService.java: Added method "updatePid()" to set new portal pid to all pages related to this specific portal.
This commit is contained in:
parent
f50d434e1d
commit
a1fddbd2a8
|
@ -333,4 +333,16 @@ public class PageService {
|
|||
page.setEntities(entities);
|
||||
return pageDAO.save(page);
|
||||
}
|
||||
|
||||
public void updatePid(String old_pid, String new_pid, String portalType) {
|
||||
log.debug("page service: updatePid");
|
||||
List<Page> pages = pageDAO.findByPortalTypeAndPortalPidOrNull(portalType, old_pid);
|
||||
for(Page page : pages) {
|
||||
if (page != null) {
|
||||
page.setPortalPid(new_pid);
|
||||
pageDAO.save(page);
|
||||
log.debug("page "+page.getId()+" saved!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue