Project

General

Profile

1
package eu.dnetlib.data.emailSender;
2

    
3
import eu.dnetlib.data.claims.entity.Claim;
4
import eu.dnetlib.data.claims.entity.Context;
5
import eu.dnetlib.data.claims.entity.Notification;
6
import eu.dnetlib.data.claims.entity.Project;
7
import eu.dnetlib.data.claims.handler.*;
8
import eu.dnetlib.data.claims.utils.ClaimUtils;
9
//import eu.dnetlib.data.claims.utils.CommunityUtils;
10
import eu.dnetlib.data.claims.sql.SQLStoreException;
11
import eu.dnetlib.data.claims.utils.ManagerUtils;
12
import org.apache.log4j.Logger;
13
import org.springframework.beans.factory.annotation.Autowired;
14

    
15
import javax.mail.*;
16
import javax.mail.internet.AddressException;
17
import javax.mail.internet.InternetAddress;
18
import javax.mail.internet.MimeMessage;
19
import java.text.SimpleDateFormat;
20
import java.util.*;
21

    
22
public class EmailSender implements Runnable {
23

    
24
    private static final Logger logger = Logger.getLogger(EmailSender.class);
25

    
26
    @Autowired
27
    private FetchClaimHandler fetchClaimHandler = null;
28
    @Autowired
29
    private FetchProjectHandler fetchProjectHandler = null;
30
    @Autowired
31
    private FetchNotificationHandler fetchNotificationHandler = null;
32
    @Autowired
33
    private NotificationHandler notificationHandler = null;
34
    @Autowired
35
    private FetchContextHandler fetchContextHandler = null;
36

    
37
    @Autowired
38
    private String defaultFrequencyInHours;
39

    
40
//    @Autowired
41
//    private CommunityUtils communityUtils;
42

    
43
    @Autowired
44
    private ManagerUtils managerUtils;
45

    
46
    private static String manageCommunityUserNotificationsPage;
47
    private static String openaireProjectClaimsPage;
48
    private static String openaireCommunityClaimsPage;
49
    private static String username;
50
    private static String password;
51
    private static String host;
52
    private static String port;
53
    private static String from;
54
    private static String auth;
55
    private static String contactMail;
56
    private static String specialRecipients;
57
    private static String enabledCommunities;
58
    private static boolean notifyCommunityManagers;
59
    private static boolean notifyProjectManagers;
60

    
61
    @Override
62
    public void run() {
63
        logger.info("EmailSender thread is running. " + host);
64
        logger.info("Special Recipients  " + specialRecipients);
65
        logger.info("Enabled Communities " + enabledCommunities);
66

    
67
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
68
        Date date = new Date();
69
        String dateTo = (format.format(date));
70
        if(notifyCommunityManagers){
71
            defaultEmails_For_CommunityClaims(dateTo, format);  // daily for managers not in notification table
72
            notificationEmails_For_CommunityClaims(dateTo, format);
73
        }
74
        if(notifyProjectManagers) {
75
//        defaultEmails_For_ProjectClaims(dateTo, format);    // daily for managers not in notification table
76
//        notificationEmails_For_ProjectClaims(dateTo, format);
77
        }
78
    }
79

    
80
    public void defaultEmails_For_ProjectClaims(String dateTo, SimpleDateFormat format) {
81
        Map<String, List<String>> managersOfProject = new HashMap<String, List<String>>();
82
        Project project;
83
        List<Claim> claims = null;
84
        List<String> types = new ArrayList<String>();
85

    
86
        types.add(ClaimUtils.PROJECT);
87

    
88
        Calendar calendar = Calendar.getInstance();
89
        calendar.add(Calendar.HOUR_OF_DAY, -(Integer.parseInt(defaultFrequencyInHours)-1));
90
        calendar.add(Calendar.MINUTE, -59);
91
        calendar.add(Calendar.SECOND, -59);
92
        Date date = calendar.getTime();
93
        String dateFrom=(format.format(date));
94

    
95
        logger.debug("Sending emails for project claims between " + dateFrom + " and "+dateTo);
96

    
97
        try {
98
            // Get all claims between dateFrom and dateTo which satisfy source_type == "project" or target_type == "project"
99
            claims = fetchClaimHandler.fetchClaimsByDate(dateFrom, dateTo, null, null, "", "source", true, types, false);
100
        } catch (SQLStoreException|Exception e) {
101
            logger.error("Could not fetch claims by date from "+dateFrom+" to "+dateTo, e);
102
        }
103

    
104
        for (Claim claim: claims) {
105
            if (claim.getSourceType().equals("project")) {
106
                project = (Project)claim.getSource();
107
            } else {
108
                project = (Project)claim.getTarget();
109
            }
110

    
111
            if (!managersOfProject.containsKey(project.getOpenaireId())) {
112

    
113
                // specialRecipients are used currently for testing purposes
114
                List<String> tmpManagers = null;
115
                if (specialRecipients != null && !specialRecipients.isEmpty()) {
116
                    tmpManagers = new ArrayList<>(Arrays.asList(specialRecipients.split("\\s*,\\s*")));
117
                    logger.debug("Special recipients: " + specialRecipients);
118

    
119
                    if(tmpManagers != null) {
120
                        Iterator itr = tmpManagers.iterator();
121
                        while (itr.hasNext()) {
122
                            String manager = (String) itr.next();
123
                            Notification notification = null;
124
                            try {
125
                                notification = fetchNotificationHandler.fetchNotification(project.getOpenaireId(), manager);
126
                            } catch (Exception e) {
127
                                e.printStackTrace();
128
                            } catch (SQLStoreException e) {
129
                                e.printStackTrace();
130
                            }
131
                            if (notification != null) {
132
                                itr.remove();
133
                            }
134
                        }
135
                    }
136

    
137
                    managersOfProject.put(project.getOpenaireId(), tmpManagers);
138
                }
139

    
140
                // Send emails to actual project managers instead of special recipients
141
                List<String> managers = null;
142
                try {
143
                    managers = fetchProjectHandler.fetchContactEmailsByProjectId(project.getOpenaireId());
144
                    logger.debug("All actual Managers of project " + project.getOpenaireId() + ": "+managers);
145

    
146
                    if(managers != null) {
147
                        Iterator itr = managers.iterator();
148
                        while (itr.hasNext()) {
149
                            String manager = (String) itr.next();
150
                            Notification notification = fetchNotificationHandler.fetchNotification(project.getOpenaireId(), manager);
151
                            //if (notification != null && (!notification.isNotify() || notification.getFrequency() != 24)) {
152
                            if (notification != null) {
153
                                itr.remove();
154
                            }
155
                        }
156
                    }
157
                } catch (Exception e) {
158
                    e.printStackTrace();
159
                } catch (SQLStoreException e) {
160
                    e.printStackTrace();
161
                }
162

    
163
                logger.debug("Managers of project (not in notification table) " + project.getOpenaireId() + ": "+managers);
164
                /*
165
                managersOfProject.put(project.getOpenaireId(), managers);
166
                */
167

    
168
                if (managersOfProject.get(project.getOpenaireId()) != null &&
169
                        !managersOfProject.get(project.getOpenaireId()).isEmpty()) {
170
                    send(project.getOpenaireId(), project.getName(), "project", managersOfProject.get(project.getOpenaireId()));
171
                }
172
            }
173
        }
174
    }
175

    
176
    public void defaultEmails_For_CommunityClaims(String dateTo, SimpleDateFormat format) {
177
        Map<String, List<String>> managersOfCommunity = new HashMap<String, List<String>>();
178
        Context context;
179
        List<Claim> claims = null;
180
        List<String> types = new ArrayList<String>();
181

    
182
        types.add(ClaimUtils.CONTEXT);
183

    
184
        Calendar calendar = Calendar.getInstance();
185
        calendar.add(Calendar.HOUR_OF_DAY, -(Integer.parseInt(defaultFrequencyInHours)-1));
186
        calendar.add(Calendar.MINUTE, -59);
187
        calendar.add(Calendar.SECOND, -59);
188
        Date date = calendar.getTime();
189
        String dateFrom=(format.format(date));
190

    
191
        List<String> enabledCommunitiesList = null;
192
        if (enabledCommunities != null && !enabledCommunities.isEmpty()) {
193
            enabledCommunitiesList = Arrays.asList(enabledCommunities.split("\\s*,\\s*"));
194
        }
195

    
196
        logger.debug("Sending emails for community claims between " + dateFrom + " and "+dateTo);
197

    
198
        try {
199
            // Get all claims between dateFrom and dateTo which satisfy source_type == "context" or target_type == "context"
200
            claims = fetchClaimHandler.fetchClaimsByDate(dateFrom, dateTo, null, null, "", "source", true, types, false);
201
        } catch (SQLStoreException|Exception e) {
202
            logger.error("Could not fetch claims by date from "+dateFrom+" to "+dateTo, e);
203
        }
204

    
205
        for (Claim claim: claims) {
206
            if (claim.getSourceType().equals("context")) {
207
                context = (Context)claim.getSource();
208
            } else {
209
                context = (Context)claim.getTarget();
210
            }
211

    
212
            String openaireId = context.getOpenaireId().split("::")[0];
213
            if (!managersOfCommunity.containsKey(openaireId) && enabledCommunitiesList != null && enabledCommunitiesList.contains(openaireId)) {
214

    
215
                /*
216
                // specialRecipients are used currently for testing purposes
217
                List<String> tmpManagers = null;
218
                if (specialRecipients != null && !specialRecipients.isEmpty()) {
219
                    tmpManagers = Arrays.asList(specialRecipients.split("\\s*,\\s*"));
220
                    logger.debug("Special recipients: " + specialRecipients);
221
                    managersOfCommunity.put(openaireId, tmpManagers);
222
                }
223
                */
224

    
225

    
226
                // Send emails to actual project managers instead of special recipients
227
                List<String> managers = null;
228
                try {
229
                    //CommunityUtils communityInfo = this.communityUtils.getCommunityInfo(openaireId);
230
                    List<ManagerUtils> managerUtils = this.managerUtils.getManagersByEmail(openaireId);
231
                    //managers = communityInfo.getManagers();
232
                    if(managerUtils != null) {
233
                        Iterator<ManagerUtils> itr = managerUtils.iterator();
234
                        while (itr.hasNext()) {
235
                            String manager = (String) itr.next().getEmail();
236
                            Notification notification = fetchNotificationHandler.fetchNotification(openaireId, manager);
237
                            if (notification != null) {
238
                                itr.remove();
239
                            } else {
240
                                if(managers == null) {
241
                                    managers = new ArrayList<>();
242
                                }
243
                                managers.add(manager);
244
                                logger.debug("Sending email to community manager: "+ manager);
245
                            }
246
                        }
247
                    }
248
                    else {
249
                        logger.debug("Community Managers: null");
250
                    }
251
                } catch (Exception e) {
252
                    e.printStackTrace();
253
                } catch (SQLStoreException e) {
254
                    e.printStackTrace();
255
                }
256

    
257
                logger.debug("Managers of community " + openaireId + ": "+managers);
258
                managersOfCommunity.put(openaireId, managers);
259

    
260

    
261
                if (managersOfCommunity.get(openaireId) != null &&
262
                        !managersOfCommunity.get(openaireId).isEmpty()) {
263
                    send(openaireId, context.getTitle().split(">")[0], "community", managersOfCommunity.get(openaireId));
264
                }
265
            } else if(enabledCommunitiesList == null || !enabledCommunitiesList.contains(openaireId)) {
266
                logger.debug("Community "+openaireId+" is not enabled");
267
            }
268
        }
269
    }
270

    
271
    public void notificationEmails_For_ProjectClaims(String dateTo, SimpleDateFormat format) {
272
        Project project = null;
273
        List<String> types = new ArrayList<String>();
274

    
275
        types.add(ClaimUtils.PROJECT);
276

    
277
        logger.debug("Sending email for project claims from notification table");
278

    
279
        try {
280
            List<Notification> trueNotifications = fetchNotificationHandler.fetchTrueNotifications();
281
            logger.debug(trueNotifications);
282
            if(trueNotifications != null) {
283
                for(Notification notification : trueNotifications) {
284
                    List<String> managers = fetchProjectHandler.fetchContactEmailsByProjectId(notification.getOpenaireId());
285
                    if(managers != null && managers.contains(notification.getUserMail())) {
286

    
287
                        Date _dateTo = format.parse(dateTo);
288

    
289
                        Date _last_interaction_date = notification.getDate();
290
                        Calendar cal = Calendar.getInstance();
291
                        cal.setTime(_last_interaction_date);
292
                        cal.add(Calendar.SECOND, 1);
293
                        _last_interaction_date = cal.getTime();
294

    
295
                        String last_interaction_date = (format.format(_last_interaction_date));
296

    
297
                        long diff = _dateTo.getTime() - notification.getDate().getTime();
298
                        diff = diff / 1000;
299

    
300
                        if (diff >= (notification.getFrequency() * 3600)) {
301
                            if (fetchClaimHandler.fetchNumberOfClaimsByDateAndOpenaireId(last_interaction_date, dateTo, notification.getOpenaireId(), null, null, "", null, true, types, false) > 0) {
302
                                List<String> managersByNotification = new ArrayList<>();
303
                                managersByNotification.add(notification.getUserMail());
304

    
305
                                project = fetchProjectHandler.fetchProjectById(notification.getOpenaireId());
306

    
307
                                logger.debug("Sending email for project claims between " + last_interaction_date + " and " + dateTo + " to " + notification.getUserMail());
308

    
309
                                send(project.getOpenaireId(), project.getName(), "project", managersByNotification);
310
                            }
311

    
312
                            notificationHandler.updateNotificationLastInteractionDate(notification.getOpenaireId(), notification.getUserMail(), _dateTo);
313
                        }
314
                    } else {
315
                        logger.debug("managers do not contain "+notification.getUserMail());
316
                    }
317
                }
318
            } else {
319
                logger.debug("true notifications: null");
320
            }
321
        } catch (Exception e) {
322
            e.printStackTrace();
323
        } catch (SQLStoreException e) {
324
            e.printStackTrace();
325
        }
326
    }
327

    
328
    public void notificationEmails_For_CommunityClaims(String dateTo, SimpleDateFormat format) {
329
        Context context = null;
330
        List<String> types = new ArrayList<String>();
331

    
332
        types.add(ClaimUtils.CONTEXT);
333

    
334
        List<String> enabledCommunitiesList = null;
335
        if (enabledCommunities != null && !enabledCommunities.isEmpty()) {
336
            enabledCommunitiesList = Arrays.asList(enabledCommunities.split("\\s*,\\s*"));
337
        }
338

    
339
        logger.debug("Sending email for community claims from notification table");
340

    
341
        try {
342
            List<Notification> trueNotifications = fetchNotificationHandler.fetchTrueNotifications();
343

    
344
            Map<String, List<String>> allManagers = new HashMap<>();
345

    
346
            if(trueNotifications != null) {
347
                for(Notification notification : trueNotifications) {
348
                    if (enabledCommunitiesList != null && enabledCommunitiesList.contains(notification.getOpenaireId())) {
349

    
350
                        if(!allManagers.containsKey(notification.getOpenaireId())) {
351
                            allManagers.put(notification.getOpenaireId(), new ArrayList());
352

    
353
//                        CommunityUtils communityInfo = this.communityUtils.getCommunityInfo(notification.getOpenaireId());
354
                            List<ManagerUtils> managerUtils = this.managerUtils.getManagersByEmail(notification.getOpenaireId());
355

    
356
//                        List<String> managers = null;
357
                            if (managerUtils != null) {
358
                                for (ManagerUtils manager : managerUtils) {
359
                                    allManagers.get(notification.getOpenaireId()).add(manager.getEmail());
360
                                }
361
                            }
362
                        }
363

    
364

    
365
//                        if (managers != null && managers.contains(notification.getUserMail())) {
366
                        if(allManagers.get(notification.getOpenaireId()).contains(notification.getUserMail())) {
367
                            Date _dateTo = format.parse(dateTo);
368

    
369
                            Date _last_interaction_date = notification.getDate();
370
                            Calendar cal = Calendar.getInstance();
371
                            cal.setTime(_last_interaction_date);
372
                            cal.add(Calendar.SECOND, 1);
373
                            _last_interaction_date = cal.getTime();
374

    
375
                            String last_interaction_date = (format.format(_last_interaction_date));
376
                            long diff = _dateTo.getTime() - notification.getDate().getTime();
377
                            diff = diff / 1000;
378

    
379
                            if (diff >= (notification.getFrequency() * 3600)) {
380
                                if (fetchClaimHandler.fetchNumberOfClaimsByDateAndOpenaireId(last_interaction_date, dateTo, notification.getOpenaireId(), null, null, "", null, true, types, false) > 0) {
381
                                    List<String> managersByNotification = new ArrayList<>();
382
                                    managersByNotification.add(notification.getUserMail());
383

    
384
                                    // We need that to get name of community
385
                                    context = fetchContextHandler.fetchFirstContextByCommunityId(notification.getOpenaireId());
386

    
387
                                    logger.debug("Sending email for community claims between " + last_interaction_date + " and " + dateTo + " to " + notification.getUserMail());
388

    
389
                                    send(context.getOpenaireId().split("::")[0], context.getTitle().split(">")[0], "community", managersByNotification);
390
                                }
391

    
392
                                notificationHandler.updateNotificationLastInteractionDate(notification.getOpenaireId(), notification.getUserMail(), _dateTo);
393
                            } else {
394
                                logger.debug("[no notification] User "+notification.getUserMail()+" got latest notification at "+last_interaction_date+" and has set frequency to: "+notification.getFrequency());
395
                            }
396
                        } else {
397
                            logger.debug("User "+notification.getUserMail()+" is not manager of community "+notification.getOpenaireId());
398
                        }
399
                    } else {
400
                        logger.debug("Community "+notification.getOpenaireId()+" is not enabled");
401
                    }
402
                }
403
            }
404
        } catch (Exception e) {
405
            e.printStackTrace();
406
        } catch (SQLStoreException e) {
407
            e.printStackTrace();
408
        }
409
    }
410

    
411
    public void send(String openaire_id, String openaire_name, String type, List<String> managers) {
412
        logger.debug("Sending email");
413
        String openaireClaimsPageUrl = "";
414
        String manageUserNotificationsPage = "";
415
        String messageContent = "";
416
        String subject = "";
417

    
418
        if(type.equals("project")) {
419
            openaireClaimsPageUrl = openaireProjectClaimsPage + openaire_id;
420

    
421
            subject = "[OpenAIRE] Links notification";
422
            messageContent = "There are new Claims for: '" + openaire_name +"' project for which you seem to be a contact person." +
423
                    "<br>Click <a href=\""+openaireClaimsPageUrl+"\">here</a> to curate these Claims.";
424
        } else if(type.equals("community")) {
425
            openaireClaimsPageUrl = openaireCommunityClaimsPage.replace("{community}", openaire_id);
426

    
427
            manageUserNotificationsPage = manageCommunityUserNotificationsPage.replace("{community}", openaire_id);
428

    
429
            subject = "[OpenAIRE-Connect] "+openaire_name+": Links notification";
430
            messageContent =
431
                    " <div style=\"font-size:14px;\">" +
432
                    "    <p>" +
433
                    "       There are new links for '"+openaire_name+"' community. Click  <a href=\""+openaireClaimsPageUrl+"\">here</a> to view the links.\n" +
434
                    "    </p>" +
435
                    "    <p>OpenAIRE team<br/>" +
436
                    "       <a href=\"https://www.openaire.eu\">www.openaire.eu</a>" +
437
                    "    </p>" +
438
                    "    <p style=\"font-size:11px;\">You are receiving this e-mail as manager of the community  <a href=\"https://"+openaire_id+".openaire.eu\">"+openaire_name+"</a>." +
439
                    "    If you are not responsible for this community, please <a href=\"mailto:"+contactMail+"\">contact us</a>." +
440
                    "    <br/>" +
441
                    "    Click  <a href=\""+manageUserNotificationsPage+"\">here</a> to manage your notification settings. </p>" +
442
                    "    </div>"
443
                    ;
444
        }
445

    
446
        //logger.debug(messageContent);
447

    
448
        // Get system properties
449
        Properties properties = System.getProperties();
450
        properties.setProperty("mail.smtp.host", host);
451
        properties.put("mail.smtp.port", port);
452
        properties.put("mail.smtp.auth", auth); //enable authentication
453
        properties.put("mail.smtp.starttls.enable", "true");
454

    
455
        Session session = Session.getInstance(properties,
456
            new javax.mail.Authenticator() {
457
                protected PasswordAuthentication getPasswordAuthentication() {
458
                    return new PasswordAuthentication(username, password);
459
                }
460
            });
461

    
462
        try {
463
            // Create a default MimeMessage object.
464
            MimeMessage message = new MimeMessage(session);
465

    
466
            // Set From: header field of the header.
467
            message.setFrom(new InternetAddress(from));
468

    
469
            // Set To: header field of the header.
470
            for(String to : managers) {
471
                logger.debug(to);
472
                message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
473
            }
474
            message.addRecipient(Message.RecipientType.BCC, new InternetAddress("openaire.test@gmail.com"));
475

    
476
            // Set Subject: header field
477
            message.setSubject(subject);
478

    
479
            // For simple text setText() can be used instead of setContent()
480

    
481
            // Send the actual HTML message, as big as you like
482
            message.setContent(messageContent, "text/html");
483

    
484
            // Send message
485
            Transport.send(message);
486
            logger.debug("Sent message successfully....\n");
487

    
488
        } catch (AddressException ae) {
489
            logger.error("Email could not be send.", ae);
490

    
491
        } catch (MessagingException me) {
492
            logger.error("Email could not be send.", me);
493
        }
494
    }
495

    
496
    public void setFetchClaimHandler(FetchClaimHandler fetchClaimHandler) {
497
        this.fetchClaimHandler = fetchClaimHandler;
498
    }
499

    
500
    public void setFetchProjectHandler(FetchProjectHandler fetchProjectHandler) {
501
        this.fetchProjectHandler = fetchProjectHandler;
502
    }
503

    
504
    public void setFetchNotificationHandler(FetchNotificationHandler fetchNotificationHandler) {
505
        this.fetchNotificationHandler = fetchNotificationHandler;
506
    }
507

    
508
    public void setNotificationHandler(NotificationHandler notificationHandler) {
509
        this.notificationHandler = notificationHandler;
510
    }
511

    
512
    public void setFetchContextHandler(FetchContextHandler fetchContextHandler) {
513
        this.fetchContextHandler = fetchContextHandler;
514
    }
515

    
516
    public void setOpenaireProjectClaimsPage(String openaireProjectClaimsPage) {
517
        EmailSender.openaireProjectClaimsPage = openaireProjectClaimsPage;
518
    }
519

    
520
    public void setOpenaireCommunityClaimsPage(String openaireCommunityClaimsPage) {
521
        EmailSender.openaireCommunityClaimsPage = openaireCommunityClaimsPage;
522
    }
523

    
524
    public void setManageCommunityUserNotificationsPage(String manageCommunityUserNotificationsPage) {
525
        EmailSender.manageCommunityUserNotificationsPage = manageCommunityUserNotificationsPage;
526
    }
527

    
528
    public void setUsername(String username) {
529
        EmailSender.username = username;
530
    }
531

    
532
    public void setPassword(String password) {
533
        EmailSender.password = password;
534
    }
535

    
536
    public void setHost(String host) {
537
        EmailSender.host = host;
538
    }
539

    
540
    public void setPort(String port) {
541
        EmailSender.port = port;
542
    }
543

    
544
    public void setFrom(String from) {
545
        EmailSender.from = from;
546
    }
547

    
548
    public void setAuth(String auth) {
549
        EmailSender.auth = auth;
550
    }
551

    
552
    public void setContactMail(String contactMail) { EmailSender.contactMail = contactMail; }
553

    
554
    public void setSpecialRecipients(String specialRecipients) {
555
        EmailSender.specialRecipients = specialRecipients;
556
    }
557

    
558
    public void setDefaultFrequencyInHours(String defaultFrequencyInHours) {
559
        this.defaultFrequencyInHours = defaultFrequencyInHours;
560
    }
561

    
562
    public void setEnabledCommunities(String enabledCommunities) {
563
        EmailSender.enabledCommunities = enabledCommunities;
564
    }
565

    
566
    public static boolean isNotifyCommunityManagers() {
567
        return notifyCommunityManagers;
568
    }
569

    
570
    public static void setNotifyCommunityManagers(boolean notifyCommunityManagers) {
571
        EmailSender.notifyCommunityManagers = notifyCommunityManagers;
572
    }
573

    
574
    public static boolean isNotifyProjectManagers() {
575
        return notifyProjectManagers;
576
    }
577

    
578
    public static void setNotifyProjectManagers(boolean notifyProjectManagers) {
579
        EmailSender.notifyProjectManagers = notifyProjectManagers;
580
    }
581

    
582
//    public void setCommunityUtils(CommunityUtils communityUtils) {
583
//        this.communityUtils = communityUtils;
584
//    }
585
//
586
//    public CommunityUtils getCommunityUtils() {
587
//        return communityUtils;
588
//    }
589

    
590

    
591
    public ManagerUtils getManagerUtils() {
592
        return managerUtils;
593
    }
594

    
595
    public void setManagerUtils(ManagerUtils managerUtils) {
596
        this.managerUtils = managerUtils;
597
    }
598
}
(2-2/2)