1 | package fr.sii.ogham.spring.v2.email; | |
2 | ||
3 | import org.springframework.boot.autoconfigure.sendgrid.SendGridProperties; | |
4 | ||
5 | import com.sendgrid.SendGrid; | |
6 | ||
7 | import fr.sii.ogham.core.builder.MessagingBuilder; | |
8 | import fr.sii.ogham.email.sendgrid.builder.AbstractSendGridBuilder; | |
9 | import fr.sii.ogham.email.sendgrid.v4.builder.sendgrid.SendGridV4Builder; | |
10 | import fr.sii.ogham.email.sendgrid.v4.sender.impl.sendgrid.client.DelegateSendGridClient; | |
11 | import fr.sii.ogham.spring.email.AbstractSpringSendGridConfigurer; | |
12 | import fr.sii.ogham.spring.email.OghamSendGridProperties; | |
13 | ||
14 | public class SpringSendGridV4Configurer extends AbstractSpringSendGridConfigurer { | |
15 | ||
16 | public SpringSendGridV4Configurer(OghamSendGridProperties properties, SendGridProperties springProperties, SendGrid sendGrid) { | |
17 | super(properties, springProperties, sendGrid); | |
18 | } | |
19 | ||
20 | @Override | |
21 | protected Class<? extends AbstractSendGridBuilder<?, ?>> getSendGridBuilderClass() { | |
22 |
1
1. getSendGridBuilderClass : replaced return value with null for fr/sii/ogham/spring/v2/email/SpringSendGridV4Configurer::getSendGridBuilderClass → KILLED |
return SendGridV4Builder.class; |
23 | } | |
24 | ||
25 | @Override | |
26 | protected void useSpringSendGridClient(MessagingBuilder builder) { | |
27 | // @formatter:off | |
28 | builder.email() | |
29 | .sender(SendGridV4Builder.class) | |
30 | .client(new DelegateSendGridClient(sendGrid)); | |
31 | // @formatter:on | |
32 | } | |
33 | ||
34 | @Override | |
35 | protected void applyOghamConfiguration(MessagingBuilder builder) { | |
36 |
1
1. applyOghamConfiguration : removed call to fr/sii/ogham/spring/email/AbstractSpringSendGridConfigurer::applyOghamConfiguration → KILLED |
super.applyOghamConfiguration(builder); |
37 | // @formatter:off | |
38 | builder.email() | |
39 | .sender(SendGridV4Builder.class) | |
40 | .unitTesting(properties.isUnitTesting()); | |
41 | // @formatter:on | |
42 | } | |
43 | ||
44 | } | |
Mutations | ||
22 |
1.1 |
|
36 |
1.1 |