notification.setRecipientsFIQL(notificationTO.getRecipientsFIQL()); notification.getStaticRecipients().clear(); notification.getStaticRecipients().addAll(notificationTO.getStaticRecipients()); if (!notification.getStaticRecipients().isEmpty()) { notification.getStaticRecipients().forEach(mail -> { Matcher matcher = SyncopeConstants.EMAIL_PATTERN.matcher(mail); if (!matcher.matches()) {
if (notification.getStaticRecipients() != null) { recipientEmails.addAll(notification.getStaticRecipients());
@Override public NotificationTO getNotificationTO(final Notification notification) { NotificationTO notificationTO = new NotificationTO(); notificationTO.setKey(notification.getKey()); notificationTO.setTemplate(notification.getTemplate().getKey()); notificationTO.getEvents().addAll(notification.getEvents()); notificationTO.setRecipientsFIQL(notification.getRecipientsFIQL()); notificationTO.getStaticRecipients().addAll(notification.getStaticRecipients()); notificationTO.setRecipientAttrName(notification.getRecipientAttrName()); notificationTO.setSelfAsRecipient(notification.isSelfAsRecipient()); notificationTO.setSender(notification.getSender()); notificationTO.setSubject(notification.getSubject()); notificationTO.setTraceLevel(notification.getTraceLevel()); notificationTO.setActive(notification.isActive()); notification.getAbouts().forEach(about -> { notificationTO.getAbouts().put(about.getAnyType().getKey(), about.get()); }); if (notification.getRecipientsProvider() != null) { notificationTO.setRecipientsProvider(notification.getRecipientsProvider().getKey()); } return notificationTO; }