use of org.apache.nifi.web.api.dto.ConnectionDTO in project nifi-minifi by apache.
the class ConnectionSchemaTest method setup.
@Before
public void setup() {
ConnectableDTO source = new ConnectableDTO();
source.setId(testSourceId);
ConnectableDTO destination = new ConnectableDTO();
destination.setId(testDestinationId);
dto = new ConnectionDTO();
dto.setId(testId);
dto.setName(testName);
dto.setSource(source);
dto.setSelectedRelationships(Arrays.asList(testSelectedRelationship).stream().collect(Collectors.toSet()));
dto.setDestination(destination);
dto.setBackPressureObjectThreshold(testMaxWorkQueueSize);
dto.setBackPressureDataSizeThreshold(testMaxWorkQueueDataSize);
dto.setFlowFileExpiration(testFlowfileExpiration);
dto.setPrioritizers(Arrays.asList(testQueuePrioritizerClass));
map = new HashMap<>();
map.put(CommonPropertyKeys.ID_KEY, testId);
map.put(CommonPropertyKeys.NAME_KEY, testName);
map.put(ConnectionSchema.SOURCE_ID_KEY, testSourceId);
map.put(ConnectionSchema.SOURCE_RELATIONSHIP_NAMES_KEY, new ArrayList<>(Arrays.asList(testSelectedRelationship)));
map.put(ConnectionSchema.DESTINATION_ID_KEY, testDestinationId);
map.put(ConnectionSchema.MAX_WORK_QUEUE_SIZE_KEY, testMaxWorkQueueSize);
map.put(ConnectionSchema.MAX_WORK_QUEUE_DATA_SIZE_KEY, testMaxWorkQueueDataSize);
map.put(ConnectionSchema.FLOWFILE_EXPIRATION__KEY, testFlowfileExpiration);
map.put(ConnectionSchema.QUEUE_PRIORITIZER_CLASS_KEY, testQueuePrioritizerClass);
}
Aggregations