+
+ @RequestMapping(value = { "/" }, method = RequestMethod.POST)
+ public ResponseEntity<Blueprint> createBlueprint(@RequestBody Blueprint blueprint) {
+ try {
+ service.saveBlueprint(blueprint);
+ return new ResponseEntity<>(blueprint, HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger, "Creation of blueprint failed. " + UserUtils.getStackTrace(e));
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+ }
+
+ @RequestMapping(value = { "/" }, method = RequestMethod.DELETE)
+ public ResponseEntity<Boolean> deleteBlueprint(@RequestBody Blueprint blueprint) {
+ try {
+ service.deleteBlueprint(blueprint);
+ return new ResponseEntity<>(true, HttpStatus.OK);
+ } catch (Exception e) {
+ LOGGER.error(EELFLoggerDelegate.errorLogger, "Deletion of blueprint failed. " + UserUtils.getStackTrace(e));
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+ }
+ }