use of com.mulesoft.tools.migration.library.gateway.tasks.BasicStructureMigrationTask in project mule-migration-assistant by mulesoft.
the class ThreatProtectionPolicyMigrationTestCase method setUp.
@Before
public void setUp() throws Exception {
ApplicationModel.ApplicationModelBuilder amb = new ApplicationModel.ApplicationModelBuilder();
amb.withProjectType(ProjectType.MULE_THREE_POLICY);
amb.withProjectBasePath(POLICY_APPLICATION_MODEL_PATH);
amb.withPom(pomPath);
appModel = amb.build();
doc = getDocument(this.getClass().getClassLoader().getResource(configPath.toString()).toURI().getPath());
ThreatProtectionMigrationTask task = new ThreatProtectionMigrationTask();
task.setApplicationModel(appModel);
steps = task.getSteps().stream().filter(step -> step instanceof AbstractApplicationModelMigrationStep).collect(toList());
MuleElementsMigrationTask muleElementsMigrationTask = new MuleElementsMigrationTask();
muleElementsMigrationTask.setApplicationModel(appModel);
List<MigrationStep> policyUtilsMigrationSteps = muleElementsMigrationTask.getSteps().stream().filter(step -> step instanceof AbstractApplicationModelMigrationStep).collect(toList());
steps.addAll(policyUtilsMigrationSteps);
BasicStructureMigrationTask basicStructureTask = new BasicStructureMigrationTask();
basicStructureTask.setApplicationModel(appModel);
List<MigrationStep> basicStructureSteps = basicStructureTask.getSteps().stream().filter(step -> step instanceof AbstractApplicationModelMigrationStep).collect(toList());
steps.addAll(basicStructureSteps);
}
use of com.mulesoft.tools.migration.library.gateway.tasks.BasicStructureMigrationTask in project mule-migration-assistant by mulesoft.
the class MigrationTaskLocator method getGatewayMigrationTasks.
protected List<AbstractMigrationTask> getGatewayMigrationTasks() {
List<AbstractMigrationTask> gatewayMigrationTasks = new ArrayList<>();
gatewayMigrationTasks.add(new ProxyMigrationTask());
gatewayMigrationTasks.add(new RamlProxyMigrationTask());
gatewayMigrationTasks.add(new IpFilterMigrationTask());
gatewayMigrationTasks.add(new ThreatProtectionMigrationTask());
gatewayMigrationTasks.add(new ThrottlingMigrationTask());
gatewayMigrationTasks.add(new ClientIdEnforcementMigrationTask());
gatewayMigrationTasks.add(new FederationMigrationTask());
gatewayMigrationTasks.add(new HttpMigrationTask());
gatewayMigrationTasks.add(new MuleElementsMigrationTask());
gatewayMigrationTasks.add(new PolicyUtilsMigrationTask());
gatewayMigrationTasks.add(new BasicStructureMigrationTask());
return gatewayMigrationTasks;
}
use of com.mulesoft.tools.migration.library.gateway.tasks.BasicStructureMigrationTask in project mule-migration-assistant by mulesoft.
the class ThrottlingPolicyMigrationTestCase method setUp.
@Before
public void setUp() throws Exception {
ApplicationModel.ApplicationModelBuilder amb = new ApplicationModel.ApplicationModelBuilder();
amb.withProjectType(ProjectType.MULE_THREE_POLICY);
amb.withProjectBasePath(POLICY_APPLICATION_MODEL_PATH);
amb.withPom(pomPath);
appModel = amb.build();
doc = getDocument(this.getClass().getClassLoader().getResource(configPath.toString()).toURI().getPath());
ThrottlingMigrationTask throttlingMigrationTask = new ThrottlingMigrationTask();
throttlingMigrationTask.setApplicationModel(appModel);
steps = throttlingMigrationTask.getSteps().stream().filter(step -> step instanceof AbstractApplicationModelMigrationStep).collect(toList());
BasicStructureMigrationTask basicStructureTask = new BasicStructureMigrationTask();
basicStructureTask.setApplicationModel(appModel);
List<MigrationStep> basicStructureSteps = basicStructureTask.getSteps().stream().filter(step -> step instanceof AbstractApplicationModelMigrationStep).collect(toList());
steps.addAll(basicStructureSteps);
}
use of com.mulesoft.tools.migration.library.gateway.tasks.BasicStructureMigrationTask in project mule-migration-assistant by mulesoft.
the class HttpPolicyMigrationTestCase method setUp.
@Before
public void setUp() throws Exception {
ApplicationModel.ApplicationModelBuilder amb = new ApplicationModel.ApplicationModelBuilder();
amb.withProjectType(ProjectType.MULE_THREE_POLICY);
amb.withProjectBasePath(POLICY_APPLICATION_MODEL_PATH);
appModel = amb.build();
doc = getDocument(this.getClass().getClassLoader().getResource(configPath.toString()).toURI().getPath());
HttpMigrationTask task = new HttpMigrationTask();
task.setApplicationModel(appModel);
steps = task.getSteps().stream().filter(step -> step instanceof AbstractApplicationModelMigrationStep).collect(toList());
BasicStructureMigrationTask basicStructureTask = new BasicStructureMigrationTask();
basicStructureTask.setApplicationModel(appModel);
List<MigrationStep> basicStructureSteps = basicStructureTask.getSteps().stream().filter(step -> step instanceof AbstractApplicationModelMigrationStep).collect(toList());
steps.addAll(basicStructureSteps);
}
Aggregations