All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.obj.nc.domain.dto.content.TemplateWithModelEmailContentDto Maven / Gradle / Ivy

package com.obj.nc.domain.dto.content;

import com.obj.nc.domain.Attachment;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

@Data
@EqualsAndHashCode(callSuper = false)
public class TemplateWithModelEmailContentDto extends TemplateWithModelContentDto {

    private String subjectResourceKey;
    private String[] subjectResourcesMessageParameters;
    private String subject;
    private List attachments = new ArrayList<>();

    public static  TemplateWithModelEmailContentDto create(
            String templateFileName, MODEL_TYPE model, List requiredLocales, String subjectResourceKey,
            String[] subjectResourcesMessageParameters, String subject, List attachments) {
        TemplateWithModelEmailContentDto dto = new TemplateWithModelEmailContentDto<>();
        dto.setTemplateFileName(templateFileName);
        dto.setModel(model);
        dto.setRequiredLocales(requiredLocales);
        dto.setSubjectResourceKey(subjectResourceKey);
        dto.setSubjectResourcesMessageParameters(subjectResourcesMessageParameters);
        dto.setSubject(subject);
        dto.setAttachments(attachments);
        return dto;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy