use of org.talend.designer.core.ui.routine.RoutineItemRecord in project tdi-studio-se by Talend.
the class SetupProcessDependenciesRoutinesAction method createRoutinesDependencies.
private void createRoutinesDependencies(ProcessType process, List<RoutineItemRecord> routineRecords) {
if (routineRecords == null) {
return;
}
for (RoutineItemRecord r : routineRecords) {
List<RoutinesParameterType> routinesDependencies = process.getParameters().getRoutinesParameter();
boolean found = false;
for (RoutinesParameterType type : routinesDependencies) {
// if (r.isSystem() == type.isSystem()) {
if (type.getId().equals(r.getId()) || type.getName().equals(r.getName())) {
found = true;
break;
}
// }
}
if (!found) {
RoutinesParameterType itemRecordType = TalendFileFactory.eINSTANCE.createRoutinesParameterType();
itemRecordType.setName(r.getName());
itemRecordType.setId(r.getId());
process.getParameters().getRoutinesParameter().add(itemRecordType);
}
}
}
Aggregations