@RestController @RequestMapping(value="/api") public class GraphResource extends Object
| Constructor and Description |
|---|
GraphResource(GraphService graphService,
UserRepository userRepository) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<Graph> |
createGraph(@Valid Graph graph)
POST /graphs : Create a new graph.
|
org.springframework.http.ResponseEntity<Void> |
deleteGraph(Long id)
DELETE /graphs/:id : delete the "id" graph.
|
org.springframework.http.ResponseEntity<List<Graph>> |
getAllGraphs(org.springframework.data.domain.Pageable pageable)
GET /graphs : get all the graphs.
|
org.springframework.http.ResponseEntity<Graph> |
getGraph(Long id)
GET /graphs/:id : get the "id" graph.
|
org.springframework.http.ResponseEntity<List<Graph>> |
getMyGraphs()
Get all graphs owned by logged in user, plus all shared graphs.
|
org.springframework.http.ResponseEntity<Graph> |
updateGraph(@Valid Graph graph)
PUT /graphs : Updates an existing graph.
|
public GraphResource(GraphService graphService, UserRepository userRepository)
@PostMapping(value="/graphs") @Timed public org.springframework.http.ResponseEntity<Graph> createGraph(@Valid @RequestBody @Valid Graph graph) throws URISyntaxException
graph - the graph to createURISyntaxException - if the Location URI syntax is incorrect@PutMapping(value="/graphs") @Timed public org.springframework.http.ResponseEntity<Graph> updateGraph(@Valid @RequestBody @Valid Graph graph) throws URISyntaxException
graph - the graph to updateURISyntaxException - if the Location URI syntax is incorrect@GetMapping(value="/graphs") @Timed public org.springframework.http.ResponseEntity<List<Graph>> getAllGraphs(org.springframework.data.domain.Pageable pageable) throws URISyntaxException
pageable - the pagination informationURISyntaxException - if there is an error to generate the pagination HTTP headers@GetMapping(value="/graphs/{id}")
@Timed
public org.springframework.http.ResponseEntity<Graph> getGraph(@PathVariable
Long id)
id - the id of the graph to retrieve@DeleteMapping(value="/graphs/{id}")
@Timed
public org.springframework.http.ResponseEntity<Void> deleteGraph(@PathVariable
Long id)
id - the id of the graph to delete@GetMapping(value="/mygraphs") @Timed public org.springframework.http.ResponseEntity<List<Graph>> getMyGraphs() throws URISyntaxException
URISyntaxExceptionCopyright © 2019 Power TAC. All rights reserved.