use of com.evolveum.midpoint.notifications.api.events.BaseEvent in project midpoint by Evolveum.
the class NotificationManagerImpl method processEvent.
public void processEvent(@Nullable Event event, Task task, OperationResult result) {
if (event == null) {
return;
}
if (event instanceof BaseEvent) {
((BaseEvent) event).setNotificationFunctions(notificationFunctions);
}
LOGGER.trace("NotificationManager processing event {}", event);
if (event.getAdHocHandler() != null) {
processEvent(event, event.getAdHocHandler(), task, result);
}
SystemConfigurationType systemConfigurationType = NotificationFunctionsImpl.getSystemConfiguration(cacheRepositoryService, result);
if (systemConfigurationType == null) {
// something really wrong happened (or we are doing initial import of objects)
return;
}
if (systemConfigurationType.getNotificationConfiguration() == null) {
LOGGER.trace("No notification configuration in repository, finished event processing.");
return;
}
NotificationConfigurationType notificationConfigurationType = systemConfigurationType.getNotificationConfiguration();
processNotifications(notificationConfigurationType, event, task, result);
LOGGER.trace("NotificationManager successfully processed event {} ({} top level handler(s))", event, notificationConfigurationType.getHandler().size());
}
Aggregations