Revision 60034
Added by Konstantina Galouni over 3 years ago
LayoutService.java | ||
---|---|---|
14 | 14 |
private LayoutDAO layoutDAO; |
15 | 15 |
|
16 | 16 |
public void updatePid(String old_pid, String new_pid) { |
17 |
log.debug("layout service: updatePid"); |
|
17 | 18 |
Layout layout = layoutDAO.findByPortalPid(old_pid); |
18 |
layout.setPortalPid(new_pid); |
|
19 |
layoutDAO.save(layout); |
|
19 |
log.debug("layout service: layout id: "+(layout != null ? layout.getId() : "not found")); |
|
20 |
if(layout != null) { |
|
21 |
layout.setPortalPid(new_pid); |
|
22 |
log.debug("layout layout: new layout pid: " + layout.getPortalPid()); |
|
23 |
layoutDAO.save(layout); |
|
24 |
log.debug("layout saved!"); |
|
25 |
} |
|
20 | 26 |
} |
21 | 27 |
|
22 | 28 |
public void deleteByPid(String pid) { |
Also available in: Unified diff
[Trunk | Admin tools]:
1. NotificationsService.java: [NEW] service for notifications with updatePid and deleteByPid methods.
2. LayoutService.java & StatisticsService.java & SubscriberService.java: Logs added.
3. CommunityController.java:
a. [Bug fix] On "updateCommunity()" (/update) method update pid for related notifications, layout, statistics and subscribers (old_pid had the value of new_pid, not the old one).
b. Add update pid for notifications when updating portal pid | Delete related notifications by pid when deleting a portal.