1 | package fr.sii.ogham.spring.email; | |
2 | ||
3 | import java.util.List; | |
4 | ||
5 | import org.springframework.boot.context.properties.ConfigurationProperties; | |
6 | import org.springframework.boot.context.properties.NestedConfigurationProperty; | |
7 | ||
8 | import fr.sii.ogham.spring.common.MessageSpecificFreemarkerProperties; | |
9 | import fr.sii.ogham.spring.common.MessageSpecificTemplateProperties; | |
10 | import fr.sii.ogham.spring.common.MessageSpecificThymeleafProperties; | |
11 | import fr.sii.ogham.spring.common.OghamTemplateProperties; | |
12 | import fr.sii.ogham.spring.common.SendRetryProperties; | |
13 | ||
14 | @ConfigurationProperties("ogham.email") | |
15 | public class OghamEmailProperties implements OghamTemplateProperties { | |
16 | @NestedConfigurationProperty | |
17 | private FromProperties from = new FromProperties(); | |
18 | @NestedConfigurationProperty | |
19 | private SubjectProperties subject = new SubjectProperties(); | |
20 | @NestedConfigurationProperty | |
21 | private ToProperties to = new ToProperties(); | |
22 | @NestedConfigurationProperty | |
23 | private CcProperties cc = new CcProperties(); | |
24 | @NestedConfigurationProperty | |
25 | private BccProperties bcc = new BccProperties(); | |
26 | @NestedConfigurationProperty | |
27 | private MessageSpecificFreemarkerProperties freemarker = new MessageSpecificFreemarkerProperties(); | |
28 | @NestedConfigurationProperty | |
29 | private MessageSpecificThymeleafProperties thymeleaf = new MessageSpecificThymeleafProperties(); | |
30 | @NestedConfigurationProperty | |
31 | private MessageSpecificTemplateProperties template = new MessageSpecificTemplateProperties(); | |
32 | @NestedConfigurationProperty | |
33 | private SendRetryProperties sendRetry = new SendRetryProperties(); | |
34 | @NestedConfigurationProperty | |
35 | private ImageInliningProperties imageInlining = new ImageInliningProperties(); | |
36 | ||
37 | public FromProperties getFrom() { | |
38 |
2
1. getFrom : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getFrom → KILLED 2. getFrom : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getFrom → KILLED |
return from; |
39 | } | |
40 | ||
41 | public void setFrom(FromProperties from) { | |
42 | this.from = from; | |
43 | } | |
44 | ||
45 | public SubjectProperties getSubject() { | |
46 |
2
1. getSubject : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getSubject → KILLED 2. getSubject : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getSubject → KILLED |
return subject; |
47 | } | |
48 | ||
49 | public void setSubject(SubjectProperties subject) { | |
50 | this.subject = subject; | |
51 | } | |
52 | ||
53 | public ToProperties getTo() { | |
54 |
2
1. getTo : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getTo → KILLED 2. getTo : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getTo → KILLED |
return to; |
55 | } | |
56 | ||
57 | public void setTo(ToProperties to) { | |
58 | this.to = to; | |
59 | } | |
60 | ||
61 | public CcProperties getCc() { | |
62 |
2
1. getCc : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getCc → TIMED_OUT 2. getCc : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getCc → KILLED |
return cc; |
63 | } | |
64 | ||
65 | public void setCc(CcProperties cc) { | |
66 | this.cc = cc; | |
67 | } | |
68 | ||
69 | public BccProperties getBcc() { | |
70 |
2
1. getBcc : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getBcc → KILLED 2. getBcc : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getBcc → KILLED |
return bcc; |
71 | } | |
72 | ||
73 | public void setBcc(BccProperties bcc) { | |
74 | this.bcc = bcc; | |
75 | } | |
76 | ||
77 | public MessageSpecificFreemarkerProperties getFreemarker() { | |
78 |
2
1. getFreemarker : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getFreemarker → KILLED 2. getFreemarker : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getFreemarker → KILLED |
return freemarker; |
79 | } | |
80 | ||
81 | public void setFreemarker(MessageSpecificFreemarkerProperties freemarker) { | |
82 | this.freemarker = freemarker; | |
83 | } | |
84 | ||
85 | public MessageSpecificThymeleafProperties getThymeleaf() { | |
86 |
2
1. getThymeleaf : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getThymeleaf → KILLED 2. getThymeleaf : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getThymeleaf → KILLED |
return thymeleaf; |
87 | } | |
88 | ||
89 | public void setThymeleaf(MessageSpecificThymeleafProperties thymeleaf) { | |
90 | this.thymeleaf = thymeleaf; | |
91 | } | |
92 | ||
93 | public MessageSpecificTemplateProperties getTemplate() { | |
94 |
2
1. getTemplate : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getTemplate → KILLED 2. getTemplate : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getTemplate → KILLED |
return template; |
95 | } | |
96 | ||
97 | public void setTemplate(MessageSpecificTemplateProperties template) { | |
98 | this.template = template; | |
99 | } | |
100 | ||
101 | public SendRetryProperties getSendRetry() { | |
102 |
2
1. getSendRetry : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getSendRetry → KILLED 2. getSendRetry : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getSendRetry → KILLED |
return sendRetry; |
103 | } | |
104 | ||
105 | public void setSendRetry(SendRetryProperties sendRetry) { | |
106 | this.sendRetry = sendRetry; | |
107 | } | |
108 | ||
109 | public ImageInliningProperties getImageInlining() { | |
110 |
2
1. getImageInlining : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getImageInlining → KILLED 2. getImageInlining : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties::getImageInlining → KILLED |
return imageInlining; |
111 | } | |
112 | ||
113 | public void setImageInlining(ImageInliningProperties imageInlining) { | |
114 | this.imageInlining = imageInlining; | |
115 | } | |
116 | ||
117 | public static class SubjectProperties { | |
118 | /** | |
119 | * Configures how to handle missing email subject: if no subject is | |
120 | * explicitly defined on the email, Ogham will use this value. | |
121 | */ | |
122 | private String defaultValue; | |
123 | @NestedConfigurationProperty | |
124 | private ExtractFromTextProperties extractFromText = new ExtractFromTextProperties(); | |
125 | @NestedConfigurationProperty | |
126 | private ExtractHtmlTitleProperties extractHtmlTitle = new ExtractHtmlTitleProperties(); | |
127 | ||
128 | public String getDefaultValue() { | |
129 |
1
1. getDefaultValue : replaced return value with "" for fr/sii/ogham/spring/email/OghamEmailProperties$SubjectProperties::getDefaultValue → SURVIVED |
return defaultValue; |
130 | } | |
131 | ||
132 | public void setDefaultValue(String defaultValue) { | |
133 | this.defaultValue = defaultValue; | |
134 | } | |
135 | ||
136 | public ExtractFromTextProperties getExtractFromText() { | |
137 |
2
1. getExtractFromText : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties$SubjectProperties::getExtractFromText → KILLED 2. getExtractFromText : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties$SubjectProperties::getExtractFromText → KILLED |
return extractFromText; |
138 | } | |
139 | ||
140 | public void setExtractFromText(ExtractFromTextProperties extractFromText) { | |
141 | this.extractFromText = extractFromText; | |
142 | } | |
143 | ||
144 | public ExtractHtmlTitleProperties getExtractHtmlTitle() { | |
145 |
2
1. getExtractHtmlTitle : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties$SubjectProperties::getExtractHtmlTitle → KILLED 2. getExtractHtmlTitle : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties$SubjectProperties::getExtractHtmlTitle → KILLED |
return extractHtmlTitle; |
146 | } | |
147 | ||
148 | public void setExtractHtmlTitle(ExtractHtmlTitleProperties extractHtmlTitle) { | |
149 | this.extractHtmlTitle = extractHtmlTitle; | |
150 | } | |
151 | ||
152 | } | |
153 | ||
154 | public static class ExtractHtmlTitleProperties { | |
155 | /** | |
156 | * Subject can be determined by extracting the text declared in | |
157 | * >title< node of the HTML. Enabled by default | |
158 | */ | |
159 | private boolean enable = true; | |
160 | ||
161 | public boolean isEnable() { | |
162 |
2
1. isEnable : replaced boolean return with false for fr/sii/ogham/spring/email/OghamEmailProperties$ExtractHtmlTitleProperties::isEnable → SURVIVED 2. isEnable : replaced boolean return with true for fr/sii/ogham/spring/email/OghamEmailProperties$ExtractHtmlTitleProperties::isEnable → SURVIVED |
return enable; |
163 | } | |
164 | ||
165 | public void setEnable(boolean enable) { | |
166 | this.enable = enable; | |
167 | } | |
168 | } | |
169 | ||
170 | public static class ExtractFromTextProperties { | |
171 | /** | |
172 | * Subject can be determined using the first line of text template if | |
173 | * prefixed by this value. Set to empty string to disable | |
174 | */ | |
175 | private String firstLinePrefix = "Subject:"; | |
176 | ||
177 | public String getFirstLinePrefix() { | |
178 |
1
1. getFirstLinePrefix : replaced return value with "" for fr/sii/ogham/spring/email/OghamEmailProperties$ExtractFromTextProperties::getFirstLinePrefix → SURVIVED |
return firstLinePrefix; |
179 | } | |
180 | ||
181 | public void setFirstLinePrefix(String firstLinePrefix) { | |
182 | this.firstLinePrefix = firstLinePrefix; | |
183 | } | |
184 | } | |
185 | ||
186 | public static class FromProperties { | |
187 | /** | |
188 | * Configures how to handle missing email sender address: if no sender | |
189 | * address is explicitly defined on the email, Ogham will use this | |
190 | * value. | |
191 | */ | |
192 | private String defaultValue; | |
193 | ||
194 | public String getDefaultValue() { | |
195 |
1
1. getDefaultValue : replaced return value with "" for fr/sii/ogham/spring/email/OghamEmailProperties$FromProperties::getDefaultValue → SURVIVED |
return defaultValue; |
196 | } | |
197 | ||
198 | public void setDefaultValue(String defaultValue) { | |
199 | this.defaultValue = defaultValue; | |
200 | } | |
201 | } | |
202 | ||
203 | public static class ToProperties { | |
204 | /** | |
205 | * Configures how to handle missing email recipient address: if no "to" | |
206 | * address is explicitly defined on the email, Ogham will use this | |
207 | * value. | |
208 | */ | |
209 | private List<String> defaultValue; | |
210 | ||
211 | public List<String> getDefaultValue() { | |
212 |
2
1. getDefaultValue : replaced return value with Collections.emptyList for fr/sii/ogham/spring/email/OghamEmailProperties$ToProperties::getDefaultValue → SURVIVED 2. getDefaultValue : replaced return value with Collections.emptyList for fr/sii/ogham/spring/email/OghamEmailProperties$ToProperties::getDefaultValue → TIMED_OUT |
return defaultValue; |
213 | } | |
214 | ||
215 | public void setDefaultValue(List<String> defaultValue) { | |
216 | this.defaultValue = defaultValue; | |
217 | } | |
218 | } | |
219 | ||
220 | public static class CcProperties { | |
221 | /** | |
222 | * Configures how to handle missing email recipient address: if no "cc" | |
223 | * address is explicitly defined on the email, Ogham will use this | |
224 | * value. | |
225 | */ | |
226 | private List<String> defaultValue; | |
227 | ||
228 | public List<String> getDefaultValue() { | |
229 |
2
1. getDefaultValue : replaced return value with Collections.emptyList for fr/sii/ogham/spring/email/OghamEmailProperties$CcProperties::getDefaultValue → SURVIVED 2. getDefaultValue : replaced return value with Collections.emptyList for fr/sii/ogham/spring/email/OghamEmailProperties$CcProperties::getDefaultValue → TIMED_OUT |
return defaultValue; |
230 | } | |
231 | ||
232 | public void setDefaultValue(List<String> defaultValue) { | |
233 | this.defaultValue = defaultValue; | |
234 | } | |
235 | } | |
236 | ||
237 | public static class BccProperties { | |
238 | /** | |
239 | * Configures how to handle missing email recipient address: if no "bcc" | |
240 | * address is explicitly defined on the email, Ogham will use this | |
241 | * value. | |
242 | */ | |
243 | private List<String> defaultValue; | |
244 | ||
245 | public List<String> getDefaultValue() { | |
246 |
1
1. getDefaultValue : replaced return value with Collections.emptyList for fr/sii/ogham/spring/email/OghamEmailProperties$BccProperties::getDefaultValue → SURVIVED |
return defaultValue; |
247 | } | |
248 | ||
249 | public void setDefaultValue(List<String> defaultValue) { | |
250 | this.defaultValue = defaultValue; | |
251 | } | |
252 | } | |
253 | ||
254 | public static class ImageInliningProperties { | |
255 | @NestedConfigurationProperty | |
256 | private MimetypeProperties mimetype = new MimetypeProperties(); | |
257 | ||
258 | public MimetypeProperties getMimetype() { | |
259 |
2
1. getMimetype : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties$ImageInliningProperties::getMimetype → KILLED 2. getMimetype : replaced return value with null for fr/sii/ogham/spring/email/OghamEmailProperties$ImageInliningProperties::getMimetype → KILLED |
return mimetype; |
260 | } | |
261 | ||
262 | public void setMimetype(MimetypeProperties mimetype) { | |
263 | this.mimetype = mimetype; | |
264 | } | |
265 | } | |
266 | | |
267 | public static class MimetypeProperties { | |
268 | | |
269 | /** | |
270 | * The allowed mimetypes for image inlining.<br /> | |
271 | * <br /> | |
272 | * Each allowed mimetype pattern may contain "*" character to indicate | |
273 | * that is accepts several characters (useful to match sub-types such as | |
274 | * "image/*" to match all kind of images).<br /> | |
275 | * <br /> | |
276 | * If the pattern starts with "!", then the mimetype is excluded. For | |
277 | * example, "image/*,!image/png" indicates that all kind of images are | |
278 | * allowed except for PNG images. | |
279 | */ | |
280 | private List<String> allowedMimetypes; | |
281 | ||
282 | public List<String> getAllowedMimetypes() { | |
283 |
2
1. getAllowedMimetypes : replaced return value with Collections.emptyList for fr/sii/ogham/spring/email/OghamEmailProperties$MimetypeProperties::getAllowedMimetypes → SURVIVED 2. getAllowedMimetypes : replaced return value with Collections.emptyList for fr/sii/ogham/spring/email/OghamEmailProperties$MimetypeProperties::getAllowedMimetypes → TIMED_OUT |
return allowedMimetypes; |
284 | } | |
285 | ||
286 | public void setAllowedMimetypes(List<String> allowedMimetypes) { | |
287 | this.allowedMimetypes = allowedMimetypes; | |
288 | } | |
289 | } | |
290 | ||
291 | } | |
Mutations | ||
38 |
1.1 2.2 |
|
46 |
1.1 2.2 |
|
54 |
1.1 2.2 |
|
62 |
1.1 2.2 |
|
70 |
1.1 2.2 |
|
78 |
1.1 2.2 |
|
86 |
1.1 2.2 |
|
94 |
1.1 2.2 |
|
102 |
1.1 2.2 |
|
110 |
1.1 2.2 |
|
129 |
1.1 |
|
137 |
1.1 2.2 |
|
145 |
1.1 2.2 |
|
162 |
1.1 2.2 |
|
178 |
1.1 |
|
195 |
1.1 |
|
212 |
1.1 2.2 |
|
229 |
1.1 2.2 |
|
246 |
1.1 |
|
259 |
1.1 2.2 |
|
283 |
1.1 2.2 |