use of com.blackducksoftware.integration.hub.alert.processor.NotificationItemProcessor in project hub-alert by blackducksoftware.
the class AccumulatorProcessor method process.
@Override
public DBStoreEvent process(final NotificationResults notificationData) throws Exception {
if (notificationData != null) {
try {
final HubServicesFactory hubServicesFactory = globalProperties.createHubServicesFactoryAndLogErrors(logger);
if (hubServicesFactory != null) {
logger.info("Processing accumulated notifications");
final NotificationItemProcessor notificationItemProcessor = new NotificationItemProcessor(globalProperties, hubServicesFactory.getRestConnection().logger);
final DBStoreEvent storeEvent = notificationItemProcessor.process(notificationData.getNotificationContentItems());
return storeEvent;
}
} catch (final Exception ex) {
logger.error("Error occurred durring processing of accumulated notifications", ex);
}
} else {
logger.info("No notifications to process");
}
return null;
}
Aggregations