@RequestMapping(value = "/{notificationName:.+}/enabled", method = RequestMethod.PUT) DaemonTask<Halconfig, Void> setEnabled(@PathVariable String deploymentName, @PathVariable String notificationName, @ModelAttribute ValidationSettings validationSettings, @RequestBody boolean enabled) { return GenericEnableDisableRequest.builder(halconfigParser) .updater(e -> notificationService.setEnabled(deploymentName, notificationName, e)) .validator(() -> notificationService.validateNotification(deploymentName, notificationName)) .description("Edit " + notificationName + " settings") .build() .execute(validationSettings, enabled); }