Search in sources :

Example 1 with AccumulatorReader

use of com.blackducksoftware.integration.hub.alert.accumulator.AccumulatorReader in project hub-alert by blackducksoftware.

the class GlobalSchedulingConfigActions method runAccumulator.

public void runAccumulator() throws Exception {
    final AccumulatorReader reader = new AccumulatorReader(globalProperties);
    final AccumulatorProcessor processor = new AccumulatorProcessor(globalProperties);
    final AccumulatorWriter writer = new AccumulatorWriter(notificationManager, channelTemplateManager);
    final NotificationResults results = reader.read();
    final DBStoreEvent event = processor.process(results);
    final List<DBStoreEvent> events = new ArrayList<>();
    if (event != null) {
        events.add(event);
    }
    writer.write(events);
}
Also used : AccumulatorProcessor(com.blackducksoftware.integration.hub.alert.accumulator.AccumulatorProcessor) NotificationResults(com.blackducksoftware.integration.hub.notification.NotificationResults) ArrayList(java.util.ArrayList) AccumulatorReader(com.blackducksoftware.integration.hub.alert.accumulator.AccumulatorReader) AccumulatorWriter(com.blackducksoftware.integration.hub.alert.accumulator.AccumulatorWriter) DBStoreEvent(com.blackducksoftware.integration.hub.alert.event.DBStoreEvent)

Aggregations

AccumulatorProcessor (com.blackducksoftware.integration.hub.alert.accumulator.AccumulatorProcessor)1 AccumulatorReader (com.blackducksoftware.integration.hub.alert.accumulator.AccumulatorReader)1 AccumulatorWriter (com.blackducksoftware.integration.hub.alert.accumulator.AccumulatorWriter)1 DBStoreEvent (com.blackducksoftware.integration.hub.alert.event.DBStoreEvent)1 NotificationResults (com.blackducksoftware.integration.hub.notification.NotificationResults)1 ArrayList (java.util.ArrayList)1