log.debug("Sending alert notifications for " + alert.toSimpleString() + "...");
}
List<AlertNotification> alertNotifications = alert.getAlertDefinition().getAlertNotifications();
if (alertNotifications != null && alertNotifications.size() > 0) {
AlertSenderPluginManager alertSenderPluginManager = getAlertPluginManager();
for (AlertNotification alertNotification : alertNotifications) {
try {
AlertNotificationLog notificationLog = null;
String senderName = alertNotification.getSenderName();
if (alertSenderPluginManager == null) {
notificationLog = new AlertNotificationLog(alert, senderName, ResultState.FAILURE,
"Notification was not sent as alert sender plugins are not yet initialized ");
} else if (senderName == null) {
notificationLog = new AlertNotificationLog(alert, senderName, ResultState.FAILURE,
"Sender '" + senderName + "' is not defined");
} else {
AlertSender<?> notificationSender = alertSenderPluginManager
.getAlertSenderForNotification(alertNotification);
if (notificationSender == null) {
notificationLog = new AlertNotificationLog(alert, senderName, ResultState.FAILURE,
"Failed to obtain a sender with given name");
} else {