@Test public void testGetActions() throws Exception { mockMvc.perform(get("/actions")) .andExpect(status().isOk()) .andExpect(jsonPath("$").isArray()) .andExpect(jsonPath("$").isNotEmpty()); }
@RequestMapping(value = { "/actions", "/rest/actions" }, method = RequestMethod.GET) @ApiOperation("Retrieves list of available actions.") public List<Action> getActions() { return _pipelineService.getActions(); }
PipelineController { @RequestMapping(value = { "/actions", "/rest/actions" }, method = RequestMethod.GET) @ApiOperation("Retrieves list of available actions.") public List<Action> getActions() { return _pipelineService.getActions(); } }
PipelineController { @RequestMapping(value = { "/actions", "/rest/actions" }, method = RequestMethod.GET) @ApiOperation("Retrieves list of available actions.") public List<Action> getActions() { return _pipelineService.getActions(); } @Inject  PipelineController(
            PropertiesUtil propertiesUtil,
            WorkflowPropertyService workflowPropertyService,
            PipelineService pipelineService); }
PipelineController { @RequestMapping(value = { "/actions", "/rest/actions" }, method = RequestMethod.GET) @ApiOperation("Retrieves list of available actions.") public List<Action> getActions() { return _pipelineService.getActions(); } @Inject  PipelineController(
            PropertiesUtil propertiesUtil,
            WorkflowPropertyService workflowPropertyService,
            PipelineService pipelineService); @ResponseStatus(HttpStatus.BAD_REQUEST) @ExceptionHandler(InvalidPipelineException.class) @ResponseBody MessageModel invalidPipelineHandler(InvalidPipelineException ex); @RequestMapping(value = { "/pipelines", "/rest/pipelines" }, method = RequestMethod.GET) @ApiOperation("Retrieves list of available pipelines.") List<Pipeline> getPipelines(); @RequestMapping(value = { "/pipelines", "/rest/pipelines" }, method = RequestMethod.GET, // Uses query string parameter instead of path variable to support names with special characters. params = "name") @ApiResponses(@ApiResponse(code = 404, message = "Not found")) ResponseEntity<Pipeline> getPipeline(String name); @RequestMapping(value = { "/pipelines", "/rest/pipelines" }, method = RequestMethod.POST) @ApiOperation("Adds a new pipeline.") @ApiResponses(@ApiResponse(code = 400, message = "Invalid request", response = MessageModel.class)) void add(@RequestBody Pipeline pipeline); @RequestMapping(value = { "/pipelines", "/rest/pipelines" }, method = RequestMethod.DELETE, // Uses query string parameter instead of path variable to support names with special characters. params = "name") @ApiOperation("Deletes a pipeline.") void deletePipeline(String name); @RequestMapping(value = { "/tasks", "/rest/tasks" }, method = RequestMethod.GET) @ApiOperation("Retrieves list of available tasks.") List<Task> getTasks(); @RequestMapping(value = { "/tasks", "/rest/tasks" }, method = RequestMethod.GET, // Uses query string parameter instead of path variable to support names with special characters. params = "name") @ApiResponses(@ApiResponse(code = 404, message = "Not found")) ResponseEntity<Task> getTask(String name); @RequestMapping(value = { "/tasks", "/rest/tasks" }, method = RequestMethod.POST) @ApiOperation("Adds a new task.") @ApiResponses(@ApiResponse(code = 400, message = "Invalid request", response = MessageModel.class)) void add(@RequestBody Task task); @RequestMapping(value = { "/tasks", "/rest/tasks" }, method = RequestMethod.DELETE, // Uses query string parameter instead of path variable to support names with special characters. params = "name") @ApiOperation("Deletes a task.") void deleteTask(String name); @RequestMapping(value = { "/actions", "/rest/actions" }, method = RequestMethod.GET) @ApiOperation("Retrieves list of available actions.") List<Action> getActions(); @RequestMapping(value = { "/actions", "/rest/actions" }, method = RequestMethod.GET, // Uses query string parameter instead of path variable to support names with special characters. params = "name") @ApiResponses(@ApiResponse(code = 404, message = "Not found")) ResponseEntity<Action> getAction(String name); @RequestMapping(value = { "/actions", "/rest/actions" }, method = RequestMethod.POST) @ApiOperation("Adds a new action.") @ApiResponses(@ApiResponse(code = 400, message = "Invalid request", response = MessageModel.class)) void add(@RequestBody Action action); @RequestMapping(value = { "/actions", "/rest/actions" }, method = RequestMethod.DELETE, // Uses query string parameter instead of path variable to support names with special characters. params = "name") @ApiOperation("Deletes an action.") void deleteAction(String name); @RequestMapping(value = { "/algorithms", "/rest/algorithms" }, method = RequestMethod.GET) @ApiOperation("Retrieves list of available algorithms.") List<Algorithm> getAlgorithms(); @RequestMapping(value = { "/algorithms", "/rest/algorithms" }, method = RequestMethod.GET, // Uses query string parameter instead of path variable to support names with special characters. params = "name") @ApiResponses(@ApiResponse(code = 404, message = "Not found")) ResponseEntity<Algorithm> getAlgorithm(String name); }
PipelineController { @RequestMapping(value = { "/actions", "/rest/actions" }, method = RequestMethod.GET) @ApiOperation("Retrieves list of available actions.") public List<Action> getActions() { return _pipelineService.getActions(); } @Inject  PipelineController(
            PropertiesUtil propertiesUtil,
            WorkflowPropertyService workflowPropertyService,
            PipelineService pipelineService); @ResponseStatus(HttpStatus.BAD_REQUEST) @ExceptionHandler(InvalidPipelineException.class) @ResponseBody MessageModel invalidPipelineHandler(InvalidPipelineException ex); @RequestMapping(value = { "/pipelines", "/rest/pipelines" }, method = RequestMethod.GET) @ApiOperation("Retrieves list of available pipelines.") List<Pipeline> getPipelines(); @RequestMapping(value = { "/pipelines", "/rest/pipelines" }, method = RequestMethod.GET, // Uses query string parameter instead of path variable to support names with special characters. params = "name") @ApiResponses(@ApiResponse(code = 404, message = "Not found")) ResponseEntity<Pipeline> getPipeline(String name); @RequestMapping(value = { "/pipelines", "/rest/pipelines" }, method = RequestMethod.POST) @ApiOperation("Adds a new pipeline.") @ApiResponses(@ApiResponse(code = 400, message = "Invalid request", response = MessageModel.class)) void add(@RequestBody Pipeline pipeline); @RequestMapping(value = { "/pipelines", "/rest/pipelines" }, method = RequestMethod.DELETE, // Uses query string parameter instead of path variable to support names with special characters. params = "name") @ApiOperation("Deletes a pipeline.") void deletePipeline(String name); @RequestMapping(value = { "/tasks", "/rest/tasks" }, method = RequestMethod.GET) @ApiOperation("Retrieves list of available tasks.") List<Task> getTasks(); @RequestMapping(value = { "/tasks", "/rest/tasks" }, method = RequestMethod.GET, // Uses query string parameter instead of path variable to support names with special characters. params = "name") @ApiResponses(@ApiResponse(code = 404, message = "Not found")) ResponseEntity<Task> getTask(String name); @RequestMapping(value = { "/tasks", "/rest/tasks" }, method = RequestMethod.POST) @ApiOperation("Adds a new task.") @ApiResponses(@ApiResponse(code = 400, message = "Invalid request", response = MessageModel.class)) void add(@RequestBody Task task); @RequestMapping(value = { "/tasks", "/rest/tasks" }, method = RequestMethod.DELETE, // Uses query string parameter instead of path variable to support names with special characters. params = "name") @ApiOperation("Deletes a task.") void deleteTask(String name); @RequestMapping(value = { "/actions", "/rest/actions" }, method = RequestMethod.GET) @ApiOperation("Retrieves list of available actions.") List<Action> getActions(); @RequestMapping(value = { "/actions", "/rest/actions" }, method = RequestMethod.GET, // Uses query string parameter instead of path variable to support names with special characters. params = "name") @ApiResponses(@ApiResponse(code = 404, message = "Not found")) ResponseEntity<Action> getAction(String name); @RequestMapping(value = { "/actions", "/rest/actions" }, method = RequestMethod.POST) @ApiOperation("Adds a new action.") @ApiResponses(@ApiResponse(code = 400, message = "Invalid request", response = MessageModel.class)) void add(@RequestBody Action action); @RequestMapping(value = { "/actions", "/rest/actions" }, method = RequestMethod.DELETE, // Uses query string parameter instead of path variable to support names with special characters. params = "name") @ApiOperation("Deletes an action.") void deleteAction(String name); @RequestMapping(value = { "/algorithms", "/rest/algorithms" }, method = RequestMethod.GET) @ApiOperation("Retrieves list of available algorithms.") List<Algorithm> getAlgorithms(); @RequestMapping(value = { "/algorithms", "/rest/algorithms" }, method = RequestMethod.GET, // Uses query string parameter instead of path variable to support names with special characters. params = "name") @ApiResponses(@ApiResponse(code = 404, message = "Not found")) ResponseEntity<Algorithm> getAlgorithm(String name);  }