Search in sources :

Example 1 with IMultipleComponentConnection

use of org.talend.core.model.components.IMultipleComponentConnection in project tdi-studio-se by Talend.

the class MultipleComponentManager method validateItems.

public void validateItems() {
    for (IMultipleComponentItem mainItem : itemList) {
        for (IMultipleComponentConnection connection : mainItem.getOutputConnections()) {
            String nameLinkedTo = connection.getNameTarget();
            if (nameLinkedTo != null) {
                boolean found = false;
                for (int i = 0; i < itemList.size() && !found; i++) {
                    IMultipleComponentItem linkedItem = itemList.get(i);
                    if (linkedItem.getName().equals(nameLinkedTo)) {
                        connection.setSource(mainItem);
                        connection.setTarget(linkedItem);
                        linkedItem.getInputConnections().add(connection);
                        found = true;
                    }
                }
            }
        }
    }
}
Also used : IMultipleComponentItem(org.talend.core.model.components.IMultipleComponentItem) IMultipleComponentConnection(org.talend.core.model.components.IMultipleComponentConnection)

Aggregations

IMultipleComponentConnection (org.talend.core.model.components.IMultipleComponentConnection)1 IMultipleComponentItem (org.talend.core.model.components.IMultipleComponentItem)1