use of com.thinkbiganalytics.nifi.rest.model.visitor.NifiVisitableProcessor in project kylo by Teradata.
the class NifiConnectionOrderVisitor method visitConnection.
@Override
public void visitConnection(NifiVisitableConnection connection) {
Set<String> relationships = connection.getDto().getSelectedRelationships();
String sourceType = connection.getDto().getSource().getType();
String destType = connection.getDto().getDestination().getType();
List<NifiVisitableProcessor> destinationProcessors = getDestinationProcessors(connection.getDto(), true);
List<NifiVisitableProcessor> sourceProcessors = getSourceProcessors(connection.getDto());
if (destinationProcessors != null) {
destinationProcessors.forEach(destinationProcessor -> destinationProcessor.addSourceConnectionIdentifier(connection.getDto()));
}
if (destinationProcessors != null && sourceProcessors != null) {
for (NifiVisitableProcessor destination : destinationProcessors) {
for (NifiVisitableProcessor source : sourceProcessors) {
destination.addSource(source);
source.addDestination(destination);
}
}
}
for (NifiVisitableProcessor sourceProcessor : sourceProcessors) {
sourceProcessor.addDestinationConnectionIdentifier(connection.getDto());
}
allConnections.add(connection);
}
Aggregations