Project

General

Profile

« Previous | Next » 

Revision 60034

[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.

View differences:

StatisticsService.java
14 14
    private StatisticsDAO statisticsDAO;
15 15

  
16 16
    public void updatePid(String old_pid, String new_pid) {
17
        log.debug("statistics service: updatePid");
17 18
        Statistics statistics = statisticsDAO.findByPid(old_pid);
18
        statistics.setPid(new_pid);
19
        statisticsDAO.save(statistics);
19
        log.debug("statistics service: statistics id: "+(statistics != null ? statistics.getId() : "not found"));
20
        if(statistics != null) {
21
            statistics.setPid(new_pid);
22
            log.debug("statistics service: new statistics pid: " + statistics.getPid());
23
            statisticsDAO.save(statistics);
24
            log.debug("statistics saved!");
25
        }
20 26
    }
21 27

  
22 28
    public void createPortalStatistics(String pid) {

Also available in: Unified diff