@Test(expected = ResourceNotFoundException.class) public void testGetProcessorWhenFlowDoesNotExist() { final String flowId = "DOES-NOT-EXIST"; when(flowManager.getFlow(flowId)).thenReturn(Optional.empty()); processorService.get(flowId, "procId"); }
@Override public FDProcessor get(final String flowId, final String processorId) { final FDFlow flow = getFlowOrNotFound(flowId); final FDProcessor processor = getExtensionComponent(flow, processorId, VersionedProcessGroup::getProcessors, this::validate); final String groupId = processor.getComponentConfiguration().getGroupIdentifier(); ComponentUtils.populateControllerServicePropertyDescriptors(flow, groupId, processor.getComponentDefinition()); return processor; }
StandardFDProcessorService extends BaseExtensionComponentService<VersionedProcessor, ProcessorDefinition, FDProcessor> implements FDProcessorService { @Override public FDProcessor get(final String flowId, final String processorId) { final FDFlow flow = getFlowOrNotFound(flowId); final FDProcessor processor = getExtensionComponent(flow, processorId, VersionedProcessGroup::getProcessors, this::validate); final String groupId = processor.getComponentConfiguration().getGroupIdentifier(); ComponentUtils.populateControllerServicePropertyDescriptors(flow, groupId, processor.getComponentDefinition()); return processor; } }
StandardFDProcessorService extends BaseExtensionComponentService<VersionedProcessor, ProcessorDefinition, FDProcessor> implements FDProcessorService { @Override public FDProcessor get(final String flowId, final String processorId) { final FDFlow flow = getFlowOrNotFound(flowId); final FDProcessor processor = getExtensionComponent(flow, processorId, VersionedProcessGroup::getProcessors, this::validate); final String groupId = processor.getComponentConfiguration().getGroupIdentifier(); ComponentUtils.populateControllerServicePropertyDescriptors(flow, groupId, processor.getComponentDefinition()); return processor; } @Autowired  StandardFDProcessorService(final FDFlowManager flowManager, final FDExtensionManagers extensionManagers, final ValidationService validationService); }
StandardFDProcessorService extends BaseExtensionComponentService<VersionedProcessor, ProcessorDefinition, FDProcessor> implements FDProcessorService { @Override public FDProcessor get(final String flowId, final String processorId) { final FDFlow flow = getFlowOrNotFound(flowId); final FDProcessor processor = getExtensionComponent(flow, processorId, VersionedProcessGroup::getProcessors, this::validate); final String groupId = processor.getComponentConfiguration().getGroupIdentifier(); ComponentUtils.populateControllerServicePropertyDescriptors(flow, groupId, processor.getComponentDefinition()); return processor; } @Autowired  StandardFDProcessorService(final FDFlowManager flowManager, final FDExtensionManagers extensionManagers, final ValidationService validationService); @Override FDComponentTypes getProcessorTypes(final String flowId); @Override FDPropertyDescriptor getPropertyDescriptor(final String flowId, final String processorId, final String propertyName); @Override FDProcessor create(final String flowId, final String processGroupId, final VersionedProcessor requestComponentConfig); @Override FDProcessor get(final String flowId, final String processorId); @Override FDProcessor update(final String flowId, final VersionedProcessor requestComponentConfig); @Override void delete(final String flowId, final String processorId); @Override ProcessorDefinition getComponentDefinition(final String agentClass, final VersionedProcessor componentConfig); }
StandardFDProcessorService extends BaseExtensionComponentService<VersionedProcessor, ProcessorDefinition, FDProcessor> implements FDProcessorService { @Override public FDProcessor get(final String flowId, final String processorId) { final FDFlow flow = getFlowOrNotFound(flowId); final FDProcessor processor = getExtensionComponent(flow, processorId, VersionedProcessGroup::getProcessors, this::validate); final String groupId = processor.getComponentConfiguration().getGroupIdentifier(); ComponentUtils.populateControllerServicePropertyDescriptors(flow, groupId, processor.getComponentDefinition()); return processor; } @Autowired  StandardFDProcessorService(final FDFlowManager flowManager, final FDExtensionManagers extensionManagers, final ValidationService validationService); @Override FDComponentTypes getProcessorTypes(final String flowId); @Override FDPropertyDescriptor getPropertyDescriptor(final String flowId, final String processorId, final String propertyName); @Override FDProcessor create(final String flowId, final String processGroupId, final VersionedProcessor requestComponentConfig); @Override FDProcessor get(final String flowId, final String processorId); @Override FDProcessor update(final String flowId, final VersionedProcessor requestComponentConfig); @Override void delete(final String flowId, final String processorId); @Override ProcessorDefinition getComponentDefinition(final String agentClass, final VersionedProcessor componentConfig);  }