public MessageModel(DomainProfile domainProfile, Notification notification, Task task) { destinationName = task.getDestination().getName(); destinationMap = task.getDestination().getArguments(); cc = destinationMap.get("cc"); self = (notification.getSelf() == null) ? null : notification.getSelf().toASCIIString(); notificationId = notification.getNotificationId(); revision = notification.getRevision(); topic = notification.getTopic(); summary = notification.getSummary(); trackingId = notification.getTrackingId(); attachments = notification.getAttachmentInfoList(); exception = notification.getExceptionInfo(); causes = (exception == null) ? emptyList() : unmodifiableList(exception.getCauses()); traitMap = notification.getTraitMap(); ZoneId zoneId = ZoneId.systemDefault(); createdAt = notification.getCreatedAt().withZoneSameInstant(zoneId); profileId = domainProfile.getProfileId(); domainName = domainProfile.getDomainName(); domainStatus = domainProfile.getDomainStatus(); apiKey = domainProfile.getApiKey(); apiPassword = domainProfile.getApiPassword(); notificationDbName = domainProfile.getNotificationDbName(); requestDbName = domainProfile.getRequestDbName(); routeCatalog = domainProfile.getRouteCatalog(); }