ResponseEntity changeApplicationCallEndpointSet()

in service/src/main/java/org/apache/fineract/cn/identity/rest/ApplicationCallEndpointSetRestController.java [77:91]


  ResponseEntity<Void> changeApplicationCallEndpointSet(
          @PathVariable("applicationidentifier") String applicationIdentifier,
          @PathVariable("callendpointsetidentifier") String callEndpointSetIdentifier,
          @RequestBody final CallEndpointSet instance)
  {
    if (!applicationService.applicationCallEndpointSetExists(applicationIdentifier, callEndpointSetIdentifier))
      throw ServiceException.notFound("Application call endpointset ''"
              + applicationIdentifier + "." + callEndpointSetIdentifier + "'' doesn''t exist.");

    if (!callEndpointSetIdentifier.equals(instance.getIdentifier()))
      throw ServiceException.badRequest("Instance identifiers may not be changed.");

    commandGateway.process(new ChangeApplicationCallEndpointSetCommand(applicationIdentifier, callEndpointSetIdentifier, instance));
    return ResponseEntity.accepted().build();
  }