in ddm-notification-service/src/main/java/com/epam/digital/data/platform/notification/service/AbstractSaveNotificationTemplateService.java [42:64]
protected SaveNotificationTemplateOutputDto buildOutputDtoFromDb(
NotificationTemplate template, List<NotificationTemplateAttribute> attributes) {
return SaveNotificationTemplateOutputDto.builder()
.name(template.getName())
.channel(template.getChannel())
.title(template.getTitle())
.content(template.getContent())
.checksum(template.getChecksum())
.createdAt(template.getCreatedAt())
.updatedAt(template.getUpdatedAt())
.externalTemplateId(template.getExtTemplateId())
.externallyPublishedAt(template.getExtPublishedAt())
.attributes(
attributes.stream()
.map(
attr ->
NotificationTemplateAttributeDto.builder()
.name(attr.getName())
.value(attr.getValue())
.build())
.collect(Collectors.toList()))
.build();
}