Search in sources :

Example 1 with EventProcessorConfigEntity

use of org.graylog.events.contentpack.entities.EventProcessorConfigEntity in project graylog2-server by Graylog2.

the class EventDefinitionDto method toContentPackEntity.

public EventDefinitionEntity toContentPackEntity(EntityDescriptorIds entityDescriptorIds) {
    final EventProcessorConfig config = config();
    final EventProcessorConfigEntity eventProcessorConfigEntity = config.toContentPackEntity(entityDescriptorIds);
    final ImmutableList<EventNotificationHandlerConfigEntity> notificationList = ImmutableList.copyOf(notifications().stream().map(notification -> notification.toContentPackEntity(entityDescriptorIds)).collect(Collectors.toList()));
    return EventDefinitionEntity.builder().title(ValueReference.of(title())).description(ValueReference.of(description())).priority(ValueReference.of(priority())).alert(ValueReference.of(alert())).config(eventProcessorConfigEntity).notifications(notificationList).notificationSettings(notificationSettings()).fieldSpec(fieldSpec()).keySpec(keySpec()).storage(storage()).build();
}
Also used : EventProcessorConfigEntity(org.graylog.events.contentpack.entities.EventProcessorConfigEntity) EventNotificationHandlerConfigEntity(org.graylog.events.contentpack.entities.EventNotificationHandlerConfigEntity)

Aggregations

EventNotificationHandlerConfigEntity (org.graylog.events.contentpack.entities.EventNotificationHandlerConfigEntity)1 EventProcessorConfigEntity (org.graylog.events.contentpack.entities.EventProcessorConfigEntity)1