use of org.hisp.dhis.program.notification.ProgramNotificationRecipient in project dhis2-core by dhis2.
the class ProgramNotificationTemplateObjectBundleHook method postProcess.
private void postProcess(ProgramNotificationTemplate template) {
ProgramNotificationRecipient pnr = template.getNotificationRecipient();
ValueType valueType = null;
if (RECIPIENT_TO_VALUETYPE_RESOLVER.containsKey(pnr)) {
Function<ProgramNotificationTemplate, ValueType> resolver = RECIPIENT_TO_VALUETYPE_RESOLVER.get(pnr);
valueType = resolver.apply(template);
}
template.setDeliveryChannels(CHANNEL_MAPPER.getOrDefault(valueType, Sets.newHashSet()));
}
Aggregations