use of com.mulesoft.tools.migration.library.gateway.steps.policy.mule.HttpTransformPomContributionMigrationStep in project mule-migration-assistant by mulesoft.
the class FederationPomContributionMigrationStep method execute.
@Override
public void execute(PomModel pomModel, MigrationReport migrationReport) throws RuntimeException {
new HttpTransformPomContributionMigrationStep().execute(pomModel, migrationReport);
pomModel.addDependency(new DependencyBuilder().withGroupId(COM_MULESOFT_ANYPOINT_GROUP_ID).withArtifactId(MULE_FEDERATION_EXTENSION_ARTIFACT_ID).withVersion(targetVersion(FEDERATION_EXTENSION_VERSION_PROPERTY)).withClassifier(MULE_PLUGIN_CLASSIFIER).build());
}
use of com.mulesoft.tools.migration.library.gateway.steps.policy.mule.HttpTransformPomContributionMigrationStep in project mule-migration-assistant by mulesoft.
the class ThrottlingPomContributionMigrationStep method execute.
@Override
public void execute(PomModel pomModel, MigrationReport migrationReport) throws RuntimeException {
new HttpTransformPomContributionMigrationStep().execute(pomModel, migrationReport);
pomModel.addDependency(new Dependency.DependencyBuilder().withGroupId(COM_MULESOFT_ANYPOINT_GROUP_ID).withArtifactId(MULE_THROTTLING_EXTENSION_ARTIFACT_ID).withVersion(targetVersion(THROTTLING_EXTENSION_VERSION_PROPERTY)).withClassifier(MULE_PLUGIN_CLASSIFIER).build());
}
use of com.mulesoft.tools.migration.library.gateway.steps.policy.mule.HttpTransformPomContributionMigrationStep in project mule-migration-assistant by mulesoft.
the class AbstractResponseBuilderMigrationStep method execute.
@Override
public void execute(Element element, MigrationReport migrationReport) throws RuntimeException {
element.setName(SET_RESPONSE_TAG_NAME);
element.setNamespace(HTTP_TRANSFORM_NAMESPACE);
addNamespaceDeclaration(getRootElement(element), HTTP_TRANSFORM_NAMESPACE, HTTP_TRANSFORM_XSI_SCHEMA_LOCATION_URI);
setStatusCode(element);
Element headersElement = new Element(HEADERS_TAG_NAME, HTTP_TRANSFORM_NAMESPACE);
Text textElement = new Text(HEADERS_CONTENT_VALUE + getHeadersTextContentMap(element) + "]");
headersElement.addContent(textElement);
element.addContent(headersElement);
com.mulesoft.tools.migration.library.mule.steps.http.HttpConnectorListener.httpListenerLib(getApplicationModel());
new HttpTransformPomContributionMigrationStep().execute(getApplicationModel().getPomModel().get(), migrationReport);
}
use of com.mulesoft.tools.migration.library.gateway.steps.policy.mule.HttpTransformPomContributionMigrationStep in project mule-migration-assistant by mulesoft.
the class HttpTransformPomContributionMigrationStepTestCase method pomContributionTest.
@Test
public void pomContributionTest() {
PomModel pm = new PomModel();
HttpTransformPomContributionMigrationStep step = new HttpTransformPomContributionMigrationStep();
step.execute(pm, mock(MigrationReport.class));
assertThat(pm.getDependencies().size(), is(1));
Dependency httpPolicyTransformExtension = pm.getDependencies().get(0);
assertThat(httpPolicyTransformExtension.getGroupId(), is(COM_MULESOFT_ANYPOINT_GROUP_ID));
assertThat(httpPolicyTransformExtension.getArtifactId(), is(MULE_HTTP_POLICY_TRANSFORM_EXTENSION_ARTIFACT_ID));
assertThat(httpPolicyTransformExtension.getVersion(), is(notNullValue()));
assertThat(httpPolicyTransformExtension.getClassifier(), is(MULE_PLUGIN_CLASSIFIER));
}
Aggregations