Search in sources :

Example 61 with ConnectionDTO

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);
}
Also used : ConnectionDTO(org.apache.nifi.web.api.dto.ConnectionDTO) ConnectableDTO(org.apache.nifi.web.api.dto.ConnectableDTO) Before(org.junit.Before)

Aggregations

ConnectionDTO (org.apache.nifi.web.api.dto.ConnectionDTO)61 ProcessGroupDTO (org.apache.nifi.web.api.dto.ProcessGroupDTO)33 ConnectableDTO (org.apache.nifi.web.api.dto.ConnectableDTO)29 ArrayList (java.util.ArrayList)27 HashSet (java.util.HashSet)26 PortDTO (org.apache.nifi.web.api.dto.PortDTO)25 ProcessorDTO (org.apache.nifi.web.api.dto.ProcessorDTO)24 List (java.util.List)21 HashMap (java.util.HashMap)20 Set (java.util.Set)17 NifiComponentNotFoundException (com.thinkbiganalytics.nifi.rest.client.NifiComponentNotFoundException)15 Map (java.util.Map)15 Collectors (java.util.stream.Collectors)15 NifiClientRuntimeException (com.thinkbiganalytics.nifi.rest.client.NifiClientRuntimeException)14 RemoteProcessGroupDTO (org.apache.nifi.web.api.dto.RemoteProcessGroupDTO)14 Logger (org.slf4j.Logger)14 LoggerFactory (org.slf4j.LoggerFactory)14 NifiConnectionUtil (com.thinkbiganalytics.nifi.rest.support.NifiConnectionUtil)12 Inject (javax.inject.Inject)12 StringUtils (org.apache.commons.lang3.StringUtils)12