@RequestMapping(value = "/{persistentStoreType:.+}", method = RequestMethod.PUT)
DaemonTask<Halconfig, Void> setPersistentStore(@PathVariable String deploymentName,
@PathVariable String persistentStoreType,
@ModelAttribute ValidationSettings validationSettings,
@RequestBody Object rawPersistentStore) {
PersistentStore persistentStore = objectMapper.convertValue(rawPersistentStore,
PersistentStorage.translatePersistentStoreType(persistentStoreType));
return GenericUpdateRequest.<PersistentStore>builder(halconfigParser)
.stagePath(halconfigDirectoryStructure.getStagingPath(deploymentName))
.updater(p -> persistentStorageService.setPersistentStore(deploymentName, p))
.validator(() -> persistentStorageService.validatePersistentStore(deploymentName, persistentStoreType))
.description("Edit persistent store")
.build()
.execute(validationSettings, persistentStore);
}
}