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:

SubscriberService.java
14 14
    private PortalSubscribersDAO portalSubscribersDAO;
15 15

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

  
22 28
    public void createPortalSubscribers(String pid) {

Also available in: Unified diff