@Test public void testCountByTeamName() { setSecuirtyContext(TEAMNAME, USERNAME); TeamUser teamUser = createTeamUserObject(USERNAME, TEAMNAME); when(scenarioRepository.countByTeamName(TEAMNAME)).thenReturn((long) 1); when(scenarioRepository.count()).thenReturn((long) 2); when(teamUserRepository.findByUserNameAndDefaultFlag(USERNAME, "Y")).thenReturn(teamUser); String appCount = (String) scenarioController.countByTeamName(req).getBody(); assertEquals("1", appCount); teamUser.setTeamName(ALPHATEAMNAME); setSecuirtyContext(ALPHATEAMNAME, USERNAME); appCount = (String) scenarioController.countByTeamName(req).getBody(); assertEquals("2", appCount); }
@ApiOperation(value = "This API returns count of Scenario objects available in Elastic Search for team name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned count of Scenario objects for team name"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "The resource trying to reach is not found") }) @RequestMapping(value = "/api/scenarios/count/", method = RequestMethod.GET, produces = "application/json") public ResponseEntity<Object> countByTeamName(HttpServletRequest request) { final String teamName = userDetailsService.getCurrentTeamForUser(request).getTeamName(); Long count = scenarioService.countByTeamName(teamName); return new ResponseEntity<>(count.toString(), HttpStatus.OK); }
ScenarioRestController { @ApiOperation(value = "This API returns count of Scenario objects available in Elastic Search for team name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned count of Scenario objects for team name"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "The resource trying to reach is not found") }) @RequestMapping(value = "/api/scenarios/count/", method = RequestMethod.GET, produces = "application/json") public ResponseEntity<Object> countByTeamName(HttpServletRequest request) { final String teamName = userDetailsService.getCurrentTeamForUser(request).getTeamName(); Long count = scenarioService.countByTeamName(teamName); return new ResponseEntity<>(count.toString(), HttpStatus.OK); } }
ScenarioRestController { @ApiOperation(value = "This API returns count of Scenario objects available in Elastic Search for team name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned count of Scenario objects for team name"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "The resource trying to reach is not found") }) @RequestMapping(value = "/api/scenarios/count/", method = RequestMethod.GET, produces = "application/json") public ResponseEntity<Object> countByTeamName(HttpServletRequest request) { final String teamName = userDetailsService.getCurrentTeamForUser(request).getTeamName(); Long count = scenarioService.countByTeamName(teamName); return new ResponseEntity<>(count.toString(), HttpStatus.OK); }  }
ScenarioRestController { @ApiOperation(value = "This API returns count of Scenario objects available in Elastic Search for team name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned count of Scenario objects for team name"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "The resource trying to reach is not found") }) @RequestMapping(value = "/api/scenarios/count/", method = RequestMethod.GET, produces = "application/json") public ResponseEntity<Object> countByTeamName(HttpServletRequest request) { final String teamName = userDetailsService.getCurrentTeamForUser(request).getTeamName(); Long count = scenarioService.countByTeamName(teamName); return new ResponseEntity<>(count.toString(), HttpStatus.OK); }  @ApiOperation(value = "This API returns all Scenario Objects present in Elastic Search", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned all Scenario Objects"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "No Scenario object found") }) @RequestMapping(value = "/api/scenarios/", method = RequestMethod.GET) ResponseEntity<List<Scenario>> listScenarios(); @ApiOperation(value = "This API returns list of all Scenario objects present in Elastic Search for given team", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned all Scenario Objects for given team"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "No Scenario object found for given team") }) @RequestMapping(value = "/api/scenarios/team/", method = RequestMethod.GET, produces = "application/json") ResponseEntity<List<Scenario>> listAllScenarios(HttpServletRequest request); @ApiOperation(value = "This API returns count of Scenario objects available in Elastic Search for team name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned count of Scenario objects for team name"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "The resource trying to reach is not found") }) @RequestMapping(value = "/api/scenarios/count/", method = RequestMethod.GET, produces = "application/json") ResponseEntity<Object> countByTeamName(HttpServletRequest request); @ApiOperation(value = "This API returns single Scenario Object present in Elastic Search for given Scenario ID", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned single Scenario Object for given Scenario ID"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "No Scenario object found for given Scenario ID") }) @RequestMapping(value = "/api/scenarios/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<Object> getScenario(@PathVariable("id") String id); @ApiOperation(value = "This API returns Scenario Objects present in Elastic Search for given App Name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned Scenario Objects for given App Name"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "No Scenario object found for given App Name") }) @RequestMapping(value = "/api/scenarios/scenariosby-appname/{applicationName:.+}", method = RequestMethod.GET, produces = "application/json") ResponseEntity<Object> listAllScenariosByApplicationName(HttpServletRequest request,
			@PathVariable("applicationName") String applicationName); @ApiOperation(value = "This API returns single Scenario Object present in Elastic Search for given Scenario Name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned single Scenario Object for given Scenario Name"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "No Scenario object found for given Scenario Name") }) @RequestMapping(value = "/api/scenarios/scenariobyname/{name:.+}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<Object> getScenarioByName(HttpServletRequest request, @PathVariable("name") String name); @ApiOperation(value = "This API returns Scenario Objects present in Elastic Search for given Scenario Name and team Name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned single Scenario Object for given Scenario Name and team Name"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "No Scenario object found for given Scenario Name and team Name") }) @RequestMapping(value = "/api/scenarios/listscenariobyname/{name:.+}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<Object> getScenarioListByName(HttpServletRequest request, @PathVariable("name") String name); @ApiOperation(value = "This API inserts a Scenario Object into Elastic Search", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 201, message = "Scenario object successfully inserted into ES"), @ApiResponse(code = 401, message = "User is not authorized to perform Add operation"), @ApiResponse(code = 409, message = "Scenario with same name is already exist"), @ApiResponse(code = 404, message = "The resource trying to reach is not found"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/scenario/", method = RequestMethod.POST, produces = "application/json", consumes = MediaType.ALL_VALUE) ResponseEntity<Object> addScenario(HttpServletRequest request, @RequestBody Scenario scenario,
			UriComponentsBuilder ucBuilder); @ApiOperation(value = "This API updates a Scenario Objects into Elastic Search", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Scenario objects successfully updated into ES"), @ApiResponse(code = 401, message = "User is not authorized to perform Update operation"), @ApiResponse(code = 409, message = "Scenario with same name is already exist"), @ApiResponse(code = 404, message = "Scenario object not found in ES for given Scenario ID"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/scenarios/{id}", method = RequestMethod.PUT, produces = "application/json") ResponseEntity<Object> updateScenario(HttpServletRequest request, @PathVariable("id") String id,
			@RequestBody Scenario toModifyScenario); @ApiOperation(value = "This API deletes a Scenario Objects from Elastic Search for given Scenario ID", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Scenario object successfully deleted from ES for given Scenario ID"), @ApiResponse(code = 401, message = "User is not authorized to perform Delete operation"), @ApiResponse(code = 404, message = "Scenario object not found in ES for given Scenario ID"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/scenarios/{id}", method = RequestMethod.DELETE, produces = "application/json") ResponseEntity<Object> deleteScenario(@PathVariable("id") String id); @ApiOperation(value = "This API deletes a Scenario Objects from Elastic Search for given App Name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Scenario object successfully deleted from ES for given App Name"), @ApiResponse(code = 401, message = "User is not authorized to perform Delete operation"), @ApiResponse(code = 404, message = "Scenario object not found in ES for given App Name"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/scenarios/scenariosby-appname/{applicationName}", method = RequestMethod.DELETE, produces = "application/json") ResponseEntity<Object> deleteScenarioForApplication(HttpServletRequest request,
			@PathVariable("applicationName") String applicationName); @ApiOperation(value = "This API deletes all Scenario Objects from Elastic Search", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "All Scenario object successfully deleted from ES"), @ApiResponse(code = 401, message = "User is not authorized to perform Delete operation"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/scenarios/", method = RequestMethod.DELETE, produces = "application/json") ResponseEntity<Object> deleteAllScenarios(); @ApiOperation(value = "This API do bulk insertion of Scenario Objects into Elastic Search", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 201, message = "Scenario objects successfully inserted into ES"), @ApiResponse(code = 401, message = "User is not authorized to perform Add operation"), @ApiResponse(code = 409, message = "Scenario with same name is already exist"), @ApiResponse(code = 404, message = "The resource trying to reach is not found"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/scenarios/bulk/", method = RequestMethod.POST, produces = "application/json") ResponseEntity<Object> bulkaddScenario(HttpServletRequest request,
			@RequestBody ScenarioAdapter scenarioAdapter); @ApiOperation(value = "This API deletes Bulk Scenario Objects from Elastic Search", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Scenario object successfully deleted from ES"), @ApiResponse(code = 401, message = "User is not authorized to perform Delete operation"), @ApiResponse(code = 404, message = "The resource trying to reach is not found"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/scenarios/bulk/", method = RequestMethod.DELETE, produces = "application/json") ResponseEntity<Object> bulkdeleteScenario(@RequestBody ScenarioAdapter scenarioAdapter); @ApiOperation(value = "This API executes a Scenario for given Scenario Name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Scenario successfully executed"), @ApiResponse(code = 401, message = "User is not authorized to perform execute a Scenario"), @ApiResponse(code = 404, message = "Scenario not found for given name"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/executescenario/{name:.+}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<Object> executeScenariobyScenarioName(HttpServletRequest request,
			@PathVariable("name") String name); @ApiOperation(value = "This API executes a Scenario for given Scenario Object", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Scenario successfully executed"), @ApiResponse(code = 401, message = "User is not authorized to perform execute a Scenario"), @ApiResponse(code = 404, message = "Scenario not found for given name"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/executescenario/", method = RequestMethod.POST, produces = "application/json") ResponseEntity<Object> executeScenario(HttpServletRequest request,
			@RequestBody final Scenario execScenario1); @ApiOperation(value = "This API executes a Scenario for given Name and App Name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Scenario successfully executed for given Name and App Name"), @ApiResponse(code = 401, message = "User is not authorized to perform execute a Scenario"), @ApiResponse(code = 404, message = "Scenario not found for given name"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/executescenariowithapplication/", method = RequestMethod.POST, produces = "application/json") ResponseEntity<Object> executeScenarioWithApplication(HttpServletRequest request,
			@RequestBody final ScenarioExecutionAdapter scenarioAdapter); @ApiOperation(value = "This API do bulk execution of Scenarios", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Bulk Scenario execution is completed successfully"), @ApiResponse(code = 401, message = "User is not authorized to perform execute a Scenario"), @ApiResponse(code = 404, message = "Scenario not found for given name"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/executebulkscenario/", method = RequestMethod.POST, produces = "application/json") ResponseEntity<Object> executeBulkScenario(HttpServletRequest request,
			@RequestBody ScenarioAdapter scenarioAdapter); }
ScenarioRestController { @ApiOperation(value = "This API returns count of Scenario objects available in Elastic Search for team name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned count of Scenario objects for team name"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "The resource trying to reach is not found") }) @RequestMapping(value = "/api/scenarios/count/", method = RequestMethod.GET, produces = "application/json") public ResponseEntity<Object> countByTeamName(HttpServletRequest request) { final String teamName = userDetailsService.getCurrentTeamForUser(request).getTeamName(); Long count = scenarioService.countByTeamName(teamName); return new ResponseEntity<>(count.toString(), HttpStatus.OK); }  @ApiOperation(value = "This API returns all Scenario Objects present in Elastic Search", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned all Scenario Objects"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "No Scenario object found") }) @RequestMapping(value = "/api/scenarios/", method = RequestMethod.GET) ResponseEntity<List<Scenario>> listScenarios(); @ApiOperation(value = "This API returns list of all Scenario objects present in Elastic Search for given team", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned all Scenario Objects for given team"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "No Scenario object found for given team") }) @RequestMapping(value = "/api/scenarios/team/", method = RequestMethod.GET, produces = "application/json") ResponseEntity<List<Scenario>> listAllScenarios(HttpServletRequest request); @ApiOperation(value = "This API returns count of Scenario objects available in Elastic Search for team name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned count of Scenario objects for team name"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "The resource trying to reach is not found") }) @RequestMapping(value = "/api/scenarios/count/", method = RequestMethod.GET, produces = "application/json") ResponseEntity<Object> countByTeamName(HttpServletRequest request); @ApiOperation(value = "This API returns single Scenario Object present in Elastic Search for given Scenario ID", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned single Scenario Object for given Scenario ID"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "No Scenario object found for given Scenario ID") }) @RequestMapping(value = "/api/scenarios/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<Object> getScenario(@PathVariable("id") String id); @ApiOperation(value = "This API returns Scenario Objects present in Elastic Search for given App Name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned Scenario Objects for given App Name"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "No Scenario object found for given App Name") }) @RequestMapping(value = "/api/scenarios/scenariosby-appname/{applicationName:.+}", method = RequestMethod.GET, produces = "application/json") ResponseEntity<Object> listAllScenariosByApplicationName(HttpServletRequest request,
			@PathVariable("applicationName") String applicationName); @ApiOperation(value = "This API returns single Scenario Object present in Elastic Search for given Scenario Name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned single Scenario Object for given Scenario Name"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "No Scenario object found for given Scenario Name") }) @RequestMapping(value = "/api/scenarios/scenariobyname/{name:.+}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<Object> getScenarioByName(HttpServletRequest request, @PathVariable("name") String name); @ApiOperation(value = "This API returns Scenario Objects present in Elastic Search for given Scenario Name and team Name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Returned single Scenario Object for given Scenario Name and team Name"), @ApiResponse(code = 401, message = "User is not authorized to view requested object"), @ApiResponse(code = 404, message = "No Scenario object found for given Scenario Name and team Name") }) @RequestMapping(value = "/api/scenarios/listscenariobyname/{name:.+}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<Object> getScenarioListByName(HttpServletRequest request, @PathVariable("name") String name); @ApiOperation(value = "This API inserts a Scenario Object into Elastic Search", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 201, message = "Scenario object successfully inserted into ES"), @ApiResponse(code = 401, message = "User is not authorized to perform Add operation"), @ApiResponse(code = 409, message = "Scenario with same name is already exist"), @ApiResponse(code = 404, message = "The resource trying to reach is not found"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/scenario/", method = RequestMethod.POST, produces = "application/json", consumes = MediaType.ALL_VALUE) ResponseEntity<Object> addScenario(HttpServletRequest request, @RequestBody Scenario scenario,
			UriComponentsBuilder ucBuilder); @ApiOperation(value = "This API updates a Scenario Objects into Elastic Search", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Scenario objects successfully updated into ES"), @ApiResponse(code = 401, message = "User is not authorized to perform Update operation"), @ApiResponse(code = 409, message = "Scenario with same name is already exist"), @ApiResponse(code = 404, message = "Scenario object not found in ES for given Scenario ID"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/scenarios/{id}", method = RequestMethod.PUT, produces = "application/json") ResponseEntity<Object> updateScenario(HttpServletRequest request, @PathVariable("id") String id,
			@RequestBody Scenario toModifyScenario); @ApiOperation(value = "This API deletes a Scenario Objects from Elastic Search for given Scenario ID", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Scenario object successfully deleted from ES for given Scenario ID"), @ApiResponse(code = 401, message = "User is not authorized to perform Delete operation"), @ApiResponse(code = 404, message = "Scenario object not found in ES for given Scenario ID"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/scenarios/{id}", method = RequestMethod.DELETE, produces = "application/json") ResponseEntity<Object> deleteScenario(@PathVariable("id") String id); @ApiOperation(value = "This API deletes a Scenario Objects from Elastic Search for given App Name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Scenario object successfully deleted from ES for given App Name"), @ApiResponse(code = 401, message = "User is not authorized to perform Delete operation"), @ApiResponse(code = 404, message = "Scenario object not found in ES for given App Name"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/scenarios/scenariosby-appname/{applicationName}", method = RequestMethod.DELETE, produces = "application/json") ResponseEntity<Object> deleteScenarioForApplication(HttpServletRequest request,
			@PathVariable("applicationName") String applicationName); @ApiOperation(value = "This API deletes all Scenario Objects from Elastic Search", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "All Scenario object successfully deleted from ES"), @ApiResponse(code = 401, message = "User is not authorized to perform Delete operation"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/scenarios/", method = RequestMethod.DELETE, produces = "application/json") ResponseEntity<Object> deleteAllScenarios(); @ApiOperation(value = "This API do bulk insertion of Scenario Objects into Elastic Search", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 201, message = "Scenario objects successfully inserted into ES"), @ApiResponse(code = 401, message = "User is not authorized to perform Add operation"), @ApiResponse(code = 409, message = "Scenario with same name is already exist"), @ApiResponse(code = 404, message = "The resource trying to reach is not found"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/scenarios/bulk/", method = RequestMethod.POST, produces = "application/json") ResponseEntity<Object> bulkaddScenario(HttpServletRequest request,
			@RequestBody ScenarioAdapter scenarioAdapter); @ApiOperation(value = "This API deletes Bulk Scenario Objects from Elastic Search", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Scenario object successfully deleted from ES"), @ApiResponse(code = 401, message = "User is not authorized to perform Delete operation"), @ApiResponse(code = 404, message = "The resource trying to reach is not found"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/scenarios/bulk/", method = RequestMethod.DELETE, produces = "application/json") ResponseEntity<Object> bulkdeleteScenario(@RequestBody ScenarioAdapter scenarioAdapter); @ApiOperation(value = "This API executes a Scenario for given Scenario Name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Scenario successfully executed"), @ApiResponse(code = 401, message = "User is not authorized to perform execute a Scenario"), @ApiResponse(code = 404, message = "Scenario not found for given name"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/executescenario/{name:.+}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<Object> executeScenariobyScenarioName(HttpServletRequest request,
			@PathVariable("name") String name); @ApiOperation(value = "This API executes a Scenario for given Scenario Object", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Scenario successfully executed"), @ApiResponse(code = 401, message = "User is not authorized to perform execute a Scenario"), @ApiResponse(code = 404, message = "Scenario not found for given name"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/executescenario/", method = RequestMethod.POST, produces = "application/json") ResponseEntity<Object> executeScenario(HttpServletRequest request,
			@RequestBody final Scenario execScenario1); @ApiOperation(value = "This API executes a Scenario for given Name and App Name", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Scenario successfully executed for given Name and App Name"), @ApiResponse(code = 401, message = "User is not authorized to perform execute a Scenario"), @ApiResponse(code = 404, message = "Scenario not found for given name"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/executescenariowithapplication/", method = RequestMethod.POST, produces = "application/json") ResponseEntity<Object> executeScenarioWithApplication(HttpServletRequest request,
			@RequestBody final ScenarioExecutionAdapter scenarioAdapter); @ApiOperation(value = "This API do bulk execution of Scenarios", response = ResponseEntity.class) @ApiResponses(value = { @ApiResponse(code = 200, message = "Bulk Scenario execution is completed successfully"), @ApiResponse(code = 401, message = "User is not authorized to perform execute a Scenario"), @ApiResponse(code = 404, message = "Scenario not found for given name"), @ApiResponse(code = 400, message = "Input Request object is not valid") }) @RequestMapping(value = "/api/executebulkscenario/", method = RequestMethod.POST, produces = "application/json") ResponseEntity<Object> executeBulkScenario(HttpServletRequest request,
			@RequestBody ScenarioAdapter scenarioAdapter);  }