113 lines
2.3 KiB
Java
113 lines
2.3 KiB
Java
package com.cicdi.notify.email;
|
|
|
|
import java.util.Map;
|
|
|
|
/**
|
|
* 转换过的邮件模板
|
|
*
|
|
* @author xueye
|
|
*/
|
|
public class EmailTemplateParsed {
|
|
|
|
/**
|
|
* 邮件主题
|
|
*/
|
|
private String subject;
|
|
|
|
/**
|
|
* 邮件正文
|
|
*/
|
|
private String text;
|
|
|
|
/**
|
|
* 图片 key:text中图片占位符 value:图片uri
|
|
* 邮件图片
|
|
*/
|
|
private Map<String, String> images;
|
|
|
|
/**
|
|
* 附件 key:附件名称 value:附件uri
|
|
* 邮件附件
|
|
*/
|
|
private Map<String, String> attachments;
|
|
|
|
public EmailTemplateParsed() {
|
|
}
|
|
|
|
public EmailTemplateParsed(EmailTemplateParsed target) {
|
|
this.subject = target.subject;
|
|
this.text = target.text;
|
|
this.images = target.images;
|
|
this.attachments = target.attachments;
|
|
}
|
|
|
|
public String getSubject() {
|
|
return subject;
|
|
}
|
|
|
|
public void setSubject(String subject) {
|
|
this.subject = subject;
|
|
}
|
|
|
|
public String getText() {
|
|
return text;
|
|
}
|
|
|
|
public void setText(String text) {
|
|
this.text = text;
|
|
}
|
|
|
|
public Map<String, String> getImages() {
|
|
return images;
|
|
}
|
|
|
|
public void setImages(Map<String, String> images) {
|
|
this.images = images;
|
|
}
|
|
|
|
public Map<String, String> getAttachments() {
|
|
return attachments;
|
|
}
|
|
|
|
public void setAttachments(Map<String, String> attachments) {
|
|
this.attachments = attachments;
|
|
}
|
|
|
|
public static Builder builder(){
|
|
return new Builder();
|
|
}
|
|
|
|
public static class Builder {
|
|
private final EmailTemplateParsed target;
|
|
|
|
public Builder() {
|
|
this.target = new EmailTemplateParsed();
|
|
}
|
|
|
|
public Builder subject(String subject) {
|
|
target.subject = subject;
|
|
return this;
|
|
}
|
|
|
|
public Builder text(String text) {
|
|
target.text = text;
|
|
return this;
|
|
}
|
|
|
|
public Builder images(Map<String, String> images) {
|
|
target.images = images;
|
|
return this;
|
|
}
|
|
|
|
public Builder attachments(Map<String, String> attachments) {
|
|
target.attachments = attachments;
|
|
return this;
|
|
}
|
|
|
|
public EmailTemplateParsed build() {
|
|
return new EmailTemplateParsed(target);
|
|
}
|
|
}
|
|
|
|
}
|