Revision 58704
Added by Argiro Kokogiannaki almost 4 years ago
EmailSender.java | ||
---|---|---|
36 | 36 |
@Autowired |
37 | 37 |
private String defaultFrequencyInHours; |
38 | 38 |
|
39 |
@Autowired |
|
40 |
private CommunityUtils communityUtils; |
|
41 |
|
|
39 | 42 |
private static String manageCommunityUserNotificationsPage; |
40 | 43 |
private static String openaireProjectClaimsPage; |
41 | 44 |
private static String openaireCommunityClaimsPage; |
... | ... | |
219 | 222 |
// Send emails to actual project managers instead of special recipients |
220 | 223 |
List<String> managers = null; |
221 | 224 |
try { |
222 |
CommunityUtils communityInfo = CommunityUtils.getCommunityInfo(openaireId);
|
|
225 |
CommunityUtils communityInfo = this.communityUtils.getCommunityInfo(openaireId);
|
|
223 | 226 |
managers = communityInfo.getManagers(); |
224 | 227 |
if(managers != null) { |
225 | 228 |
Iterator itr = managers.iterator(); |
... | ... | |
333 | 336 |
for(Notification notification : trueNotifications) { |
334 | 337 |
if (enabledCommunitiesList != null && enabledCommunitiesList.contains(notification.getOpenaireId())) { |
335 | 338 |
|
336 |
CommunityUtils communityInfo = CommunityUtils.getCommunityInfo(notification.getOpenaireId());
|
|
339 |
CommunityUtils communityInfo = this.communityUtils.getCommunityInfo(notification.getOpenaireId());
|
|
337 | 340 |
List<String> managers = null; |
338 | 341 |
if (communityInfo != null) { |
339 | 342 |
managers = communityInfo.getManagers(); |
... | ... | |
549 | 552 |
public static void setNotifyProjectManagers(boolean notifyProjectManagers) { |
550 | 553 |
EmailSender.notifyProjectManagers = notifyProjectManagers; |
551 | 554 |
} |
555 |
|
|
556 |
public void setCommunityUtils(CommunityUtils communityUtils) { |
|
557 |
this.communityUtils = communityUtils; |
|
558 |
} |
|
559 |
|
|
560 |
public CommunityUtils getCommunityUtils() { |
|
561 |
return communityUtils; |
|
562 |
} |
|
552 | 563 |
} |
Also available in: Unified diff
CommunityUtils:
chnage methods from static, add it with autowired in EmailSender
update properties