test_class.file: modules/flowable-rest/src/test/java/org/flowable/rest/service/api/identity/GroupResourceTest.java
test_class.identifier: GroupResourceTest
test_class.superclass: extends BaseSpringRestTestCase
test_case.body: @Test
      public void testUpdateGroupNullFields() throws Exception {
          try {
              Group testGroup = identityService.newGroup("testgroup");
              testGroup.setName("Test group");
              testGroup.setType("Test type");
              identityService.saveGroup(testGroup);
  
              ObjectNode requestNode = objectMapper.createObjectNode();
              requestNode.set("name", null);
              requestNode.set("type", null);
  
              HttpPut httpPut = new HttpPut(SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_GROUP, "testgroup"));
              httpPut.setEntity(new StringEntity(requestNode.toString()));
              CloseableHttpResponse response = executeRequest(httpPut, HttpStatus.SC_OK);
              JsonNode responseNode = objectMapper.readTree(response.getEntity().getContent());
              closeResponse(response);
              assertThat(responseNode).isNotNull();
              assertThatJson(responseNode)
                      .when(Option.IGNORING_EXTRA_FIELDS)
                      .isEqualTo("{"
                              + " id: 'testgroup',"
                              + " name: null,"
                              + " type: null,"
                              + " url: '" + SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_GROUP, testGroup.getId()) + "'"
                              + "}");
  
              Group createdGroup = identityService.createGroupQuery().groupId("testgroup").singleResult();
              assertThat(createdGroup).isNotNull();
              assertThat(createdGroup.getName()).isNull();
              assertThat(createdGroup.getType()).isNull();
  
          } finally {
              try {
                  identityService.deleteGroup("testgroup");
              } catch (Throwable ignore) {
                  // Ignore, since the group may not have been created in the test
                  // or already deleted
              }
          }
      }
test_case.class_method_signature: GroupResourceTest.testUpdateGroupNullFields()
test_case.full_signature: @Test public void testUpdateGroupNullFields()
test_case.identifier: testUpdateGroupNullFields
test_case.invocations: newGroup setName setType saveGroup createObjectNode set set createRelativeResourceUrl setEntity toString executeRequest readTree getContent getEntity closeResponse isNotNull assertThat isEqualTo when assertThatJson createRelativeResourceUrl getId singleResult groupId createGroupQuery isNotNull assertThat isNull assertThat getName isNull assertThat getType deleteGroup
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUpdateGroupNullFields()
focal_class.file: modules/flowable-rest/src/main/java/org/flowable/rest/service/api/identity/GroupResource.java
focal_class.identifier: GroupResource
focal_class.class_method_signature: GroupResource.getGroup(@ApiParam(name = "groupId") @PathVariable String groupId, HttpServletRequest request)
focal_class.full_signature: @ApiOperation(value = "Get a single group", tags = { "Groups" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the group exists and is returned."), @ApiResponse(code = 404, message = "Indicates the requested group does not exist.") }) @GetMapping(value = "/identity/groups/{groupId}", produces = "application/json") public GroupResponse getGroup(@ApiParam(name = "groupId") @PathVariable String groupId, HttpServletRequest request)
focal_class.identifier: getGroup
focal_class.modifiers: @ApiOperation(value = "Get a single group", tags = { "Groups" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the group exists and is returned."), @ApiResponse(code = 404, message = "Indicates the requested group does not exist.") }) @GetMapping(value = "/identity/groups/{groupId}", produces = "application/json") public
focal_class.parameters: (@ApiParam(name = "groupId") @PathVariable String groupId, HttpServletRequest request)
focal_class.return: GroupResponse
focal_class.signature: GroupResponse getGroup(@ApiParam(name = "groupId") @PathVariable String groupId, HttpServletRequest request)
focal_class.class_method_signature: GroupResource.updateGroup(@ApiParam(name = "groupId") @PathVariable String groupId, @RequestBody GroupRequest groupRequest, HttpServletRequest request)
focal_class.full_signature: @ApiOperation(value = "Update a group", tags = { "Groups" }, notes = "All request values are optional. For example, you can only include the name attribute in the request body JSON-object, only updating the name of the group, leaving all other fields unaffected. When an attribute is explicitly included and is set to null, the group-value will be updated to null.") @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the group was updated."), @ApiResponse(code = 404, message = "Indicates the requested group was not found."), @ApiResponse(code = 409, message = "Indicates the requested group was updated simultaneously.") }) @PutMapping(value = "/identity/groups/{groupId}", produces = "application/json") public GroupResponse updateGroup(@ApiParam(name = "groupId") @PathVariable String groupId, @RequestBody GroupRequest groupRequest, HttpServletRequest request)
focal_class.identifier: updateGroup
focal_class.modifiers: @ApiOperation(value = "Update a group", tags = { "Groups" }, notes = "All request values are optional. For example, you can only include the name attribute in the request body JSON-object, only updating the name of the group, leaving all other fields unaffected. When an attribute is explicitly included and is set to null, the group-value will be updated to null.") @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the group was updated."), @ApiResponse(code = 404, message = "Indicates the requested group was not found."), @ApiResponse(code = 409, message = "Indicates the requested group was updated simultaneously.") }) @PutMapping(value = "/identity/groups/{groupId}", produces = "application/json") public
focal_class.parameters: (@ApiParam(name = "groupId") @PathVariable String groupId, @RequestBody GroupRequest groupRequest, HttpServletRequest request)
focal_class.return: GroupResponse
focal_class.signature: GroupResponse updateGroup(@ApiParam(name = "groupId") @PathVariable String groupId, @RequestBody GroupRequest groupRequest, HttpServletRequest request)
focal_class.class_method_signature: GroupResource.deleteGroup(@ApiParam(name = "groupId") @PathVariable String groupId, HttpServletResponse response)
focal_class.full_signature: @ApiOperation(value = "Delete a group", tags = { "Groups" }) @ApiResponses(value = { @ApiResponse(code = 204, message = "Indicates the group was found and has been deleted. Response-body is intentionally empty."), @ApiResponse(code = 404, message = "Indicates the requested group does not exist.") }) @DeleteMapping("/identity/groups/{groupId}") public void deleteGroup(@ApiParam(name = "groupId") @PathVariable String groupId, HttpServletResponse response)
focal_class.identifier: deleteGroup
focal_class.modifiers: @ApiOperation(value = "Delete a group", tags = { "Groups" }) @ApiResponses(value = { @ApiResponse(code = 204, message = "Indicates the group was found and has been deleted. Response-body is intentionally empty."), @ApiResponse(code = 404, message = "Indicates the requested group does not exist.") }) @DeleteMapping("/identity/groups/{groupId}") public
focal_class.parameters: (@ApiParam(name = "groupId") @PathVariable String groupId, HttpServletResponse response)
focal_class.return: void
focal_class.signature: void deleteGroup(@ApiParam(name = "groupId") @PathVariable String groupId, HttpServletResponse response)
focal_class.superclass: extends BaseGroupResource
focal_method.body: @ApiOperation(value = "Delete a group", tags = { "Groups" })
      @ApiResponses(value = {
              @ApiResponse(code = 204, message = "Indicates the group was found and  has been deleted. Response-body is intentionally empty."),
              @ApiResponse(code = 404, message = "Indicates the requested group does not exist.")
      })
      @DeleteMapping("/identity/groups/{groupId}")
      public void deleteGroup(@ApiParam(name = "groupId") @PathVariable String groupId, HttpServletResponse response) {
          Group group = getGroupFromRequest(groupId);
          
          if (restApiInterceptor != null) {
              restApiInterceptor.deleteGroup(group);
          }
          
          identityService.deleteGroup(group.getId());
          response.setStatus(HttpStatus.NO_CONTENT.value());
      }
focal_method.class_method_signature: GroupResource.deleteGroup(@ApiParam(name = "groupId") @PathVariable String groupId, HttpServletResponse response)
focal_method.full_signature: @ApiOperation(value = "Delete a group", tags = { "Groups" }) @ApiResponses(value = { @ApiResponse(code = 204, message = "Indicates the group was found and has been deleted. Response-body is intentionally empty."), @ApiResponse(code = 404, message = "Indicates the requested group does not exist.") }) @DeleteMapping("/identity/groups/{groupId}") public void deleteGroup(@ApiParam(name = "groupId") @PathVariable String groupId, HttpServletResponse response)
focal_method.identifier: deleteGroup
focal_method.invocations: getGroupFromRequest deleteGroup deleteGroup getId setStatus value
focal_method.modifiers: @ApiOperation(value = "Delete a group", tags = { "Groups" }) @ApiResponses(value = { @ApiResponse(code = 204, message = "Indicates the group was found and has been deleted. Response-body is intentionally empty."), @ApiResponse(code = 404, message = "Indicates the requested group does not exist.") }) @DeleteMapping("/identity/groups/{groupId}") public
focal_method.parameters: (@ApiParam(name = "groupId") @PathVariable String groupId, HttpServletResponse response)
focal_method.return: void
focal_method.signature: void deleteGroup(@ApiParam(name = "groupId") @PathVariable String groupId, HttpServletResponse response)