106107108109110111112113114115116
headers.setLocation(builder.path("/projects/{projectId}").buildAndExpand(projectMetadata.getId()).toUri()); getProjectResponse = new GetProjectResponse(projectMetadata); } catch (Throwable t) { tx.rollback(); throw t; } // Commit must come after all graph access. tx.commit();
132133134135136137138139140141142
throw new NotFound(ProjectMetadata.class, projectId); } tx.deleteProject(projectMetadata); } catch (Throwable t) { tx.rollback(); throw t; } tx.commit();
192193194195196197198199200201202
throw new NotFound(UserMetadata.class); } projectMetadata.addUser(otherUserMetadata); } catch (Throwable t) { tx.rollback(); throw t; } // Commit must come after all graph access. tx.commit();
3738394041424344454647
return false; } authenticated = checkAuthAgainstUserOfProject(tx, authentication, projectMetadata); } catch (Throwable t) { tx.rollback(); throw t; } tx.commit();
6970717273747576777879
return false; } authenticated = checkAuthAgainstUserOfProject(tx, authentication, projectMetadata); } catch (Throwable t){ tx.rollback(); throw t; } tx.commit();
5152535455565758596061
for (GraphMetadata graphMetadata : projectMetadata.getGraphs()) { graphs.add(new GetGraphResponse(graphMetadata)); } } } catch (Throwable t) { tx.rollback(); throw t; } // Commit must come after all graph access. tx.commit();
9596979899100101102103104105
121122123124125126127128129130131
176177178179180181182183184185186
try { tx.deleteGraph(graphMetadata); } catch (Exception e) { response.put("status", "error"); response.put("msg", e.toString()); tx.rollback(); return new ResponseEntity<>(HttpStatus.BAD_REQUEST); } response.put("msg", "deleted");
241242243244245246247248249250251
headers.setLocation(builder.path("/graphs/{graphId}").buildAndExpand(projectMetadata.getId()).toUri()); getGraphResponse = new GetGraphResponse(graphMetadata); } catch (Throwable t) { tx.rollback(); throw t; } tx.commit();