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();
}
Aggregations