@RestController
@RequestMapping(value="/api")
public class OperationResource
extends java.lang.Object
Constructor and Description |
---|
OperationResource(OperationRepository operationRepository) |
Modifier and Type | Method and Description |
---|---|
org.springframework.http.ResponseEntity<Operation> |
createOperation(Operation operation)
POST /operations : Create a new operation.
|
org.springframework.http.ResponseEntity<java.lang.Void> |
deleteOperation(java.lang.Long id)
DELETE /operations/:id : delete the "id" operation.
|
org.springframework.http.ResponseEntity<java.util.List<Operation>> |
getAllOperations(org.springframework.data.domain.Pageable pageable)
GET /operations : get all the operations.
|
org.springframework.http.ResponseEntity<Operation> |
getOperation(java.lang.Long id)
GET /operations/:id : get the "id" operation.
|
org.springframework.http.ResponseEntity<Operation> |
updateOperation(Operation operation)
PUT /operations : Updates an existing operation.
|
public OperationResource(OperationRepository operationRepository)
@PostMapping(value="/operations") @Timed public org.springframework.http.ResponseEntity<Operation> createOperation(@RequestBody Operation operation) throws java.net.URISyntaxException
operation
- the operation to createjava.net.URISyntaxException
- if the Location URI syntax is incorrect@PutMapping(value="/operations") @Timed public org.springframework.http.ResponseEntity<Operation> updateOperation(@RequestBody Operation operation) throws java.net.URISyntaxException
operation
- the operation to updatejava.net.URISyntaxException
- if the Location URI syntax is incorrect@GetMapping(value="/operations") @Timed public org.springframework.http.ResponseEntity<java.util.List<Operation>> getAllOperations(org.springframework.data.domain.Pageable pageable)
pageable
- the pagination information@GetMapping(value="/operations/{id}") @Timed public org.springframework.http.ResponseEntity<Operation> getOperation(@PathVariable java.lang.Long id)
id
- the id of the operation to retrieve@DeleteMapping(value="/operations/{id}") @Timed public org.springframework.http.ResponseEntity<java.lang.Void> deleteOperation(@PathVariable java.lang.Long id)
id
- the id of the operation to deleteCopyright © 2017 Osgiliath. All rights reserved.