use of org.mule.runtime.api.meta.model.declaration.fluent.OutputDeclarer in project mule by mulesoft.
the class XmlExtensionLoaderDelegate method extractOutputType.
private void extractOutputType(OutputDeclarer outputDeclarer, ComponentIdentifier componentIdentifier, ComponentModel operationModel, Optional<MetadataType> calculatedOutput) {
Optional<ComponentModel> outputAttributesComponentModel = operationModel.getInnerComponents().stream().filter(child -> child.getIdentifier().equals(componentIdentifier)).findFirst();
outputAttributesComponentModel.ifPresent(outputComponentModel -> outputDeclarer.describedAs(getDescription(outputComponentModel)));
MetadataType metadataType = getMetadataType(outputAttributesComponentModel, calculatedOutput);
outputDeclarer.ofType(metadataType);
}
Aggregations