use of org.mule.runtime.app.declaration.api.fluent.HasNestedComponentDeclarer in project mule by mulesoft.
the class DefaultXmlArtifactDeclarationLoader method declareComposableModel.
private void declareComposableModel(ComposableModel model, DslElementSyntax elementDsl, ConfigLine containerConfig, HasNestedComponentDeclarer declarer) {
containerConfig.getChildren().forEach((ConfigLine child) -> {
ExtensionModel extensionModel = getExtensionModel(child);
ElementDeclarer extensionElementsDeclarer = forExtension(extensionModel.getName());
Reference<Boolean> componentFound = new Reference<>(false);
getComponentDeclaringWalker(declaration -> {
declarer.withComponent(declaration);
componentFound.set(true);
}, child, extensionElementsDeclarer).walk(extensionModel);
if (!componentFound.get()) {
declareRoute(model, elementDsl, child, extensionElementsDeclarer).ifPresent(declarer::withComponent);
}
});
}
Aggregations