use of org.hisp.dhis.sms.config.SmsMessageSender in project dhis2-core by dhis2.
the class SmsMessageSenderTest method initTest.
@BeforeEach
public void initTest() {
setUp();
smsGateways = new ArrayList<>();
smsGateways.add(bulkSmsGateway);
smsMessageSender = new SmsMessageSender(gatewayAdministrationService, smsGateways, userSettingService, outboundSmsService);
}
use of org.hisp.dhis.sms.config.SmsMessageSender in project dhis2-core by dhis2.
the class ServiceConfig method defaultOutboundMessageBatchService.
@Bean("org.hisp.dhis.outboundmessage.OutboundMessageService")
public DefaultOutboundMessageBatchService defaultOutboundMessageBatchService(SmsMessageSender smsMessageSender, EmailMessageSender emailMessageSender) {
Map<DeliveryChannel, MessageSender> channels = new HashMap<>();
channels.put(DeliveryChannel.SMS, smsMessageSender);
channels.put(DeliveryChannel.EMAIL, emailMessageSender);
DefaultOutboundMessageBatchService service = new DefaultOutboundMessageBatchService();
service.setMessageSenders(channels);
return service;
}
Aggregations