private void extractOperationExtension(HasOperationDeclarer declarer, ComponentModel operationModel, DirectedGraph<String, DefaultEdge> directedGraph, XmlDslModel xmlDslModel) { String operationName = operationModel.getNameAttribute(); OperationDeclarer operationDeclarer = declarer.withOperation(operationName); ComponentModel bodyComponentModel = operationModel.getInnerComponents() .stream() .filter(child -> child.getIdentifier().equals(OPERATION_BODY_IDENTIFIER)).findFirst() .orElseThrow(() -> new IllegalArgumentException(format("The operation '%s' is missing the <body> statement", operationName))); directedGraph.addVertex(operationName); fillGraphWithTnsReferences(directedGraph, operationName, bodyComponentModel.getInnerComponents()); operationDeclarer.withModelProperty(new OperationComponentModelModelProperty(operationModel, bodyComponentModel)); operationDeclarer.describedAs(getDescription(operationModel)); operationDeclarer.getDeclaration().setDisplayModel(getDisplayModel(operationModel)); extractOperationParameters(operationDeclarer, operationModel); extractOutputType(operationDeclarer.withOutput(), OPERATION_OUTPUT_IDENTIFIER, operationModel, getDeclarationOutputFor(operationName)); extractOutputType(operationDeclarer.withOutputAttributes(), OPERATION_OUTPUT_ATTRIBUTES_IDENTIFIER, operationModel, getDeclarationOutputAttributesFor(operationName)); declareErrorModels(operationDeclarer, xmlDslModel, operationName, operationModel); }