use of com.mulesoft.tools.migration.library.mule.steps.spring.SpringContributions.ADDITIONAL_SPRING_NAMESPACES_PROP in project mule-migration-assistant by mulesoft.
the class PreprocessNamespaces method addReportEntries.
public void addReportEntries(Document document, MigrationReport report, ApplicationModel applicationModel) {
List<Namespace> unsupportedNamespaces = document.getRootElement().getAdditionalNamespaces().stream().filter(n -> !getElementsWithNamespace(document, n, applicationModel).isEmpty() && !containsNamespace(n, applicationModel.getSupportedNamespaces())).collect(toList());
AtomicInteger processedElements = new AtomicInteger(0);
unsupportedNamespaces.forEach(ns -> {
// Ignore nested elements of the same pass to not distort statistics or clutter the report
applicationModel.getNodes("//*[namespace-uri() = '" + ns.getURI() + "' and namespace-uri(..) != '" + ns.getURI() + "']").forEach(node -> {
processedElements.incrementAndGet();
if (ns.getURI().startsWith("http://www.mulesoft.org")) {
report.report("components.unsupported", node, node, ns.getPrefix());
} else {
report.report("components.unknown", node, node, ns.getPrefix(), ns.getURI(), ADDITIONAL_SPRING_NAMESPACES_PROP);
}
report.addComponentFailure(node);
});
});
report.addProcessedElements(processedElements.get());
}
Aggregations