test_class.file: modules/flowable-rest/src/test/java/org/flowable/rest/service/api/repository/DeploymentResourceTest.java
test_class.identifier: DeploymentResourceTest
test_class.superclass: extends BaseSpringRestTestCase
test_case.body: @Test
      @org.flowable.engine.test.Deployment(resources = { "org/flowable/rest/service/api/repository/oneTaskProcess.bpmn20.xml" })
      public void testDeleteDeployment() throws Exception {
          Deployment existingDeployment = repositoryService.createDeploymentQuery().singleResult();
          assertThat(existingDeployment).isNotNull();
  
          // Delete the deployment
          HttpDelete httpDelete = new HttpDelete(SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_DEPLOYMENT, existingDeployment.getId()));
          CloseableHttpResponse response = executeRequest(httpDelete, HttpStatus.SC_NO_CONTENT);
          closeResponse(response);
  
          existingDeployment = repositoryService.createDeploymentQuery().singleResult();
          assertThat(existingDeployment).isNull();
      }
test_case.class_method_signature: DeploymentResourceTest.testDeleteDeployment()
test_case.full_signature: @Test @org.flowable.engine.test.Deployment(resources = { "org/flowable/rest/service/api/repository/oneTaskProcess.bpmn20.xml" }) public void testDeleteDeployment()
test_case.identifier: testDeleteDeployment
test_case.invocations: singleResult createDeploymentQuery isNotNull assertThat createRelativeResourceUrl getId executeRequest closeResponse singleResult createDeploymentQuery isNull assertThat
test_case.modifiers: @Test @org.flowable.engine.test.Deployment(resources = { "org/flowable/rest/service/api/repository/oneTaskProcess.bpmn20.xml" }) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDeleteDeployment()
focal_class.declarator: restResponseFactory
focal_class.modifier: @Autowired
      protected
focal_class.original_string: @Autowired
      protected RestResponseFactory restResponseFactory;
focal_class.type: RestResponseFactory
focal_class.var_name: restResponseFactory
focal_class.declarator: repositoryService
focal_class.modifier: @Autowired
      protected
focal_class.original_string: @Autowired
      protected RepositoryService repositoryService;
focal_class.type: RepositoryService
focal_class.var_name: repositoryService
focal_class.declarator: restApiInterceptor
focal_class.modifier: @Autowired(required=false)
      protected
focal_class.original_string: @Autowired(required=false)
      protected BpmnRestApiInterceptor restApiInterceptor;
focal_class.type: BpmnRestApiInterceptor
focal_class.var_name: restApiInterceptor
focal_class.file: modules/flowable-rest/src/main/java/org/flowable/rest/service/api/repository/DeploymentResource.java
focal_class.identifier: DeploymentResource
focal_class.class_method_signature: DeploymentResource.getDeployment(@ApiParam(name = "deploymentId", value ="The id of the deployment to get.") @PathVariable String deploymentId, HttpServletRequest request)
focal_class.full_signature: @ApiOperation(value = "Get a deployment", tags = { "Deployment" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the deployment was found and returned."), @ApiResponse(code = 404, message = "Indicates the requested deployment was not found.") }) @GetMapping(value = "/repository/deployments/{deploymentId}", produces = "application/json") public DeploymentResponse getDeployment(@ApiParam(name = "deploymentId", value ="The id of the deployment to get.") @PathVariable String deploymentId, HttpServletRequest request)
focal_class.identifier: getDeployment
focal_class.modifiers: @ApiOperation(value = "Get a deployment", tags = { "Deployment" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the deployment was found and returned."), @ApiResponse(code = 404, message = "Indicates the requested deployment was not found.") }) @GetMapping(value = "/repository/deployments/{deploymentId}", produces = "application/json") public
focal_class.parameters: (@ApiParam(name = "deploymentId", value ="The id of the deployment to get.") @PathVariable String deploymentId, HttpServletRequest request)
focal_class.return: DeploymentResponse
focal_class.signature: DeploymentResponse getDeployment(@ApiParam(name = "deploymentId", value ="The id of the deployment to get.") @PathVariable String deploymentId, HttpServletRequest request)
focal_class.class_method_signature: DeploymentResource.deleteDeployment(@ApiParam(name = "deploymentId") @PathVariable String deploymentId, @RequestParam(value = "cascade", required = false, defaultValue = "false") Boolean cascade,
              HttpServletResponse response)
focal_class.full_signature: @ApiOperation(value = "Delete a deployment", tags = { "Deployment" }) @ApiResponses(value = { @ApiResponse(code = 204, message = "Indicates the deployment was found and has been deleted. Response-body is intentionally empty."), @ApiResponse(code = 404, message = "Indicates the requested deployment was not found.") }) @DeleteMapping(value = "/repository/deployments/{deploymentId}", produces = "application/json") public void deleteDeployment(@ApiParam(name = "deploymentId") @PathVariable String deploymentId, @RequestParam(value = "cascade", required = false, defaultValue = "false") Boolean cascade,
              HttpServletResponse response)
focal_class.identifier: deleteDeployment
focal_class.modifiers: @ApiOperation(value = "Delete a deployment", tags = { "Deployment" }) @ApiResponses(value = { @ApiResponse(code = 204, message = "Indicates the deployment was found and has been deleted. Response-body is intentionally empty."), @ApiResponse(code = 404, message = "Indicates the requested deployment was not found.") }) @DeleteMapping(value = "/repository/deployments/{deploymentId}", produces = "application/json") public
focal_class.parameters: (@ApiParam(name = "deploymentId") @PathVariable String deploymentId, @RequestParam(value = "cascade", required = false, defaultValue = "false") Boolean cascade,
              HttpServletResponse response)
focal_class.return: void
focal_class.signature: void deleteDeployment(@ApiParam(name = "deploymentId") @PathVariable String deploymentId, @RequestParam(value = "cascade", required = false, defaultValue = "false") Boolean cascade,
              HttpServletResponse response)
focal_method.body: @ApiOperation(value = "Delete a deployment", tags = { "Deployment" })
      @ApiResponses(value = {
              @ApiResponse(code = 204, message = "Indicates the deployment was found and has been deleted. Response-body is intentionally empty."),
              @ApiResponse(code = 404, message = "Indicates the requested deployment was not found.")
      })
      @DeleteMapping(value = "/repository/deployments/{deploymentId}", produces = "application/json")
      public void deleteDeployment(@ApiParam(name = "deploymentId") @PathVariable String deploymentId, @RequestParam(value = "cascade", required = false, defaultValue = "false") Boolean cascade,
              HttpServletResponse response) {
          
          Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
  
          if (deployment == null) {
              throw new FlowableObjectNotFoundException("Could not find a deployment with id '" + deploymentId + "'.", Deployment.class);
          }
          
          if (restApiInterceptor != null) {
              restApiInterceptor.deleteDeployment(deployment);
          }
  
          if (cascade) {
              repositoryService.deleteDeployment(deploymentId, true);
          } else {
              repositoryService.deleteDeployment(deploymentId);
          }
          response.setStatus(HttpStatus.NO_CONTENT.value());
      }
focal_method.class_method_signature: DeploymentResource.deleteDeployment(@ApiParam(name = "deploymentId") @PathVariable String deploymentId, @RequestParam(value = "cascade", required = false, defaultValue = "false") Boolean cascade,
              HttpServletResponse response)
focal_method.full_signature: @ApiOperation(value = "Delete a deployment", tags = { "Deployment" }) @ApiResponses(value = { @ApiResponse(code = 204, message = "Indicates the deployment was found and has been deleted. Response-body is intentionally empty."), @ApiResponse(code = 404, message = "Indicates the requested deployment was not found.") }) @DeleteMapping(value = "/repository/deployments/{deploymentId}", produces = "application/json") public void deleteDeployment(@ApiParam(name = "deploymentId") @PathVariable String deploymentId, @RequestParam(value = "cascade", required = false, defaultValue = "false") Boolean cascade,
              HttpServletResponse response)
focal_method.identifier: deleteDeployment
focal_method.invocations: singleResult deploymentId createDeploymentQuery deleteDeployment deleteDeployment deleteDeployment setStatus value
focal_method.modifiers: @ApiOperation(value = "Delete a deployment", tags = { "Deployment" }) @ApiResponses(value = { @ApiResponse(code = 204, message = "Indicates the deployment was found and has been deleted. Response-body is intentionally empty."), @ApiResponse(code = 404, message = "Indicates the requested deployment was not found.") }) @DeleteMapping(value = "/repository/deployments/{deploymentId}", produces = "application/json") public
focal_method.parameters: (@ApiParam(name = "deploymentId") @PathVariable String deploymentId, @RequestParam(value = "cascade", required = false, defaultValue = "false") Boolean cascade,
              HttpServletResponse response)
focal_method.return: void
focal_method.signature: void deleteDeployment(@ApiParam(name = "deploymentId") @PathVariable String deploymentId, @RequestParam(value = "cascade", required = false, defaultValue = "false") Boolean cascade,
              HttpServletResponse response)