use of org.graylog2.contentpacks.model.ModelId in project graylog2-server by Graylog2.
the class EventDefinitionFacade method resolveNativeEntity.
@Override
public Graph<EntityDescriptor> resolveNativeEntity(EntityDescriptor entityDescriptor) {
final MutableGraph<EntityDescriptor> mutableGraph = GraphBuilder.directed().build();
mutableGraph.addNode(entityDescriptor);
final ModelId modelId = entityDescriptor.id();
final Optional<EventDefinitionDto> eventDefinition = eventDefinitionService.get(modelId.id());
if (eventDefinition.isPresent()) {
eventDefinition.get().resolveNativeEntity(entityDescriptor, mutableGraph);
} else {
LOG.debug("Couldn't find event definition {}", entityDescriptor);
}
return ImmutableGraph.copyOf(mutableGraph);
}
Aggregations