use of org.mule.runtime.module.extension.internal.config.dsl.construct.RouteComponentParser in project mule by mulesoft.
the class ExtensionDefinitionParser method parseRoute.
private void parseRoute(NestedRouteModel routeModel) {
DslElementSyntax routeDsl = dslResolver.resolve(routeModel);
Class<?> type = routeModel.getModelProperty(ImplementingTypeModelProperty.class).map(ImplementingTypeModelProperty::getType).orElseThrow(() -> new IllegalStateException("Missing route information"));
MetadataType metadataType = typeLoader.load(type);
addParameter(getChildKey(routeModel.getName()), new DefaultObjectParsingDelegate().parse(routeModel.getName(), (ObjectType) metadataType, routeDsl));
try {
new RouteComponentParser(baseDefinitionBuilder, routeModel, metadataType, getContextClassLoader(), routeDsl, dslResolver, parsingContext).parse().forEach(this::addDefinition);
} catch (Exception e) {
throw new MuleRuntimeException(new ConfigurationException(e));
}
}
Aggregations