use of org.mule.runtime.dsl.api.component.config.ComponentConfiguration in project mule by mulesoft.
the class DeclarationBasedElementModelFactory method createList.
private void createList(ParameterListValue list, DslElementSyntax listDsl, Object model, ArrayType listType, InternalComponentConfiguration.Builder parentConfig, DslElementModel.Builder parentElement) {
final DslElementModel.Builder listElement = DslElementModel.builder().withModel(model).withDsl(listDsl);
final InternalComponentConfiguration.Builder listConfig = InternalComponentConfiguration.builder().withIdentifier(asIdentifier(listDsl));
final MetadataType itemType = listType.getType();
listDsl.getGeneric(itemType).ifPresent(itemDsl -> list.getValues().forEach(value -> createListItemConfig(itemType, value, itemDsl, listConfig, listElement)));
ComponentConfiguration result = listConfig.build();
parentConfig.withNestedComponent(result);
parentElement.containing(listElement.withConfig(result).build());
}
Aggregations