use of com.mulesoft.tools.migration.library.gateway.steps.GatewayNamespaces.MULE_4_CORE_NAMESPACE_NO_PREFIX in project mule-migration-assistant by mulesoft.
the class AbstractThrottlingMigrationStep method addOnErrorPropagateElement.
protected void addOnErrorPropagateElement(Element errorHandlerElement) {
List<Element> onErrorPropagateElements = errorHandlerElement.getChildren(ON_ERROR_PROPAGATE_TAG_NAME, MULE_4_CORE_NAMESPACE_NO_PREFIX);
Element onErrorPropagateElement = getOnErrorPropagateElement();
if (onErrorPropagateElements.stream().filter(e -> {
Element addHeadersChildElement = e.getChild(ADD_HEADERS_TAG_NAME, HTTP_TRANSFORM_NAMESPACE);
return e.getContentSize() == onErrorPropagateElement.getContentSize() && addHeadersChildElement != null && matchesAddHeadersElement(addHeadersChildElement, onErrorPropagateElement.getChild(ADD_HEADERS_TAG_NAME, HTTP_TRANSFORM_NAMESPACE));
}).findAny().orElse(null) == null) {
errorHandlerElement.addContent(onErrorPropagateElement);
}
}
Aggregations