use of org.mule.runtime.config.api.dsl.model.ComponentBuildingDefinitionRegistry in project mule by mulesoft.
the class ApplicationModel method executeOnEveryRootElementWithBuildingDefinition.
private void executeOnEveryRootElementWithBuildingDefinition(BiConsumer<ComponentModel, ComponentBuildingDefinition> action) {
if (componentBuildingDefinitionRegistry.isPresent()) {
ComponentBuildingDefinitionRegistry definitionRegistry = componentBuildingDefinitionRegistry.get();
this.executeOnEveryRootElement(componentModel -> {
Optional<ComponentBuildingDefinition<?>> buildingDefinition = definitionRegistry.getBuildingDefinition(componentModel.getIdentifier());
buildingDefinition.ifPresent(componentBuildingDefinition -> {
action.accept(componentModel, componentBuildingDefinition);
});
});
}
}
Aggregations