Search in sources :

Example 1 with MigrationStepSelector

use of com.mulesoft.tools.migration.task.MigrationStepSelector in project mule-migration-assistant by mulesoft.

the class AdditionalNamespacesFactory method getTasksDeclaredNamespaces.

public static List<Namespace> getTasksDeclaredNamespaces(List<AbstractMigrationTask> migrationTasks) {
    List<Namespace> taskSupportedNamespaces = new ArrayList<>();
    for (MigrationTask task : ofNullable(migrationTasks).orElse(emptyList())) {
        MigrationStepSelector stepSelector = new MigrationStepSelector(task.getSteps());
        stepSelector.getApplicationModelContributionSteps().forEach(s -> taskSupportedNamespaces.addAll(s.getNamespacesContributions()));
    }
    taskSupportedNamespaces.add(getNamespace("mule", CORE_NAMESPACE.getURI()));
    return taskSupportedNamespaces;
}
Also used : MigrationTask(com.mulesoft.tools.migration.task.MigrationTask) AbstractMigrationTask(com.mulesoft.tools.migration.task.AbstractMigrationTask) ArrayList(java.util.ArrayList) Namespace(org.jdom2.Namespace) Namespace.getNamespace(org.jdom2.Namespace.getNamespace) MigrationStepSelector(com.mulesoft.tools.migration.task.MigrationStepSelector)

Aggregations

AbstractMigrationTask (com.mulesoft.tools.migration.task.AbstractMigrationTask)1 MigrationStepSelector (com.mulesoft.tools.migration.task.MigrationStepSelector)1 MigrationTask (com.mulesoft.tools.migration.task.MigrationTask)1 ArrayList (java.util.ArrayList)1 Namespace (org.jdom2.Namespace)1 Namespace.getNamespace (org.jdom2.Namespace.getNamespace)1