use of org.apache.nifi.web.api.entity.ProcessorTypesEntity in project nifi by apache.
the class FlowResource method getProcessorTypes.
/**
* Retrieves the types of processors that this NiFi supports.
*
* @return A processorTypesEntity.
* @throws InterruptedException if interrupted
*/
@GET
@Consumes(MediaType.WILDCARD)
@Produces(MediaType.APPLICATION_JSON)
@Path("processor-types")
@ApiOperation(value = "Retrieves the types of processors that this NiFi supports", notes = NON_GUARANTEED_ENDPOINT, response = ProcessorTypesEntity.class, authorizations = { @Authorization(value = "Read - /flow") })
@ApiResponses(value = { @ApiResponse(code = 400, message = "NiFi was unable to complete the request because it was invalid. The request should not be retried without modification."), @ApiResponse(code = 401, message = "Client could not be authenticated."), @ApiResponse(code = 403, message = "Client is not authorized to make this request."), @ApiResponse(code = 409, message = "The request was valid but NiFi was not in the appropriate state to process it. Retrying the same request later may be successful.") })
public Response getProcessorTypes(@ApiParam(value = "If specified, will only return types that are a member of this bundle group.", required = false) @QueryParam("bundleGroupFilter") String bundleGroupFilter, @ApiParam(value = "If specified, will only return types that are a member of this bundle artifact.", required = false) @QueryParam("bundleArtifactFilter") String bundleArtifactFilter, @ApiParam(value = "If specified, will only return types whose fully qualified classname matches.", required = false) @QueryParam("type") String typeFilter) throws InterruptedException {
authorizeFlow();
if (isReplicateRequest()) {
return replicate(HttpMethod.GET);
}
// create response entity
final ProcessorTypesEntity entity = new ProcessorTypesEntity();
entity.setProcessorTypes(serviceFacade.getProcessorTypes(bundleGroupFilter, bundleArtifactFilter, typeFilter));
// generate the response
return generateOkResponse(entity).build();
}
Aggregations