for (Notification notification : notificationDAO.findAll()) { if (LOG.isDebugEnabled()) { notification.getAbouts().forEach(about -> { LOG.debug("Notification about {} defined: {}", about.getAnyType(), about.get()); });
notification.getAbouts(). removeIf(anyAbout -> !notificationTO.getAbouts().containsKey(anyAbout.getAnyType().getKey()));
@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; }