Search in sources :

Example 1 with MULE_4_POLICY_NAMESPACE

use of com.mulesoft.tools.migration.library.gateway.steps.GatewayNamespaces.MULE_4_POLICY_NAMESPACE in project mule-migration-assistant by mulesoft.

the class ValidateClientProcessorChainTagMigrationStep method migrateContent.

@Override
protected void migrateContent(Element errorHandlerElement, List<Content> cloneContentList) {
    Element onErrorContinueElement = new ClientIdEnforcementOnErrorContinueElementWriter().create(errorHandlerElement, false);
    onErrorContinueElement.addContent(0, cloneContentList);
    replaceSetPayloadElement(onErrorContinueElement.getChildren(SET_PAYLOAD_TAG_NAME, MULE_4_POLICY_NAMESPACE).stream().filter(e -> {
        String attrValue = e.getAttributeValue(VALUE_ATTR_NAME);
        return attrValue.equals(VALUE_FLOW_VARS) || attrValue.equals(VALUE_VARS);
    }).findFirst().orElse(null));
    com.mulesoft.tools.migration.library.mule.steps.http.HttpConnectorListener.httpListenerLib(getApplicationModel());
    addNamespaceDeclaration(getRootElement(onErrorContinueElement), HTTP_TRANSFORM_NAMESPACE, HTTP_TRANSFORM_XSI_SCHEMA_LOCATION_URI_MULE4);
}
Also used : MULE_4_POLICY_NAMESPACE(com.mulesoft.tools.migration.library.gateway.steps.GatewayNamespaces.MULE_4_POLICY_NAMESPACE) List(java.util.List) ProcessorChainTagMigrationStep(com.mulesoft.tools.migration.library.gateway.steps.policy.ProcessorChainTagMigrationStep) ClientIdEnforcementOnErrorContinueElementWriter(com.mulesoft.tools.migration.library.gateway.steps.policy.utils.ClientIdEnforcementOnErrorContinueElementWriter) HTTP_TRANSFORM_NAMESPACE(com.mulesoft.tools.migration.library.gateway.steps.GatewayNamespaces.HTTP_TRANSFORM_NAMESPACE) Content(org.jdom2.Content) Element(org.jdom2.Element) Element(org.jdom2.Element) ClientIdEnforcementOnErrorContinueElementWriter(com.mulesoft.tools.migration.library.gateway.steps.policy.utils.ClientIdEnforcementOnErrorContinueElementWriter)

Aggregations

HTTP_TRANSFORM_NAMESPACE (com.mulesoft.tools.migration.library.gateway.steps.GatewayNamespaces.HTTP_TRANSFORM_NAMESPACE)1 MULE_4_POLICY_NAMESPACE (com.mulesoft.tools.migration.library.gateway.steps.GatewayNamespaces.MULE_4_POLICY_NAMESPACE)1 ProcessorChainTagMigrationStep (com.mulesoft.tools.migration.library.gateway.steps.policy.ProcessorChainTagMigrationStep)1 ClientIdEnforcementOnErrorContinueElementWriter (com.mulesoft.tools.migration.library.gateway.steps.policy.utils.ClientIdEnforcementOnErrorContinueElementWriter)1 List (java.util.List)1 Content (org.jdom2.Content)1 Element (org.jdom2.Element)1