@RestController
@RequestMapping(value="/api")
public class LabelResource
extends java.lang.Object
Constructor and Description |
---|
LabelResource(LabelService labelService) |
Modifier and Type | Method and Description |
---|---|
org.springframework.http.ResponseEntity<Label> |
createLabel(Label label)
POST /labels : Create a new label.
|
org.springframework.http.ResponseEntity<java.lang.Void> |
deleteLabel(java.lang.Long id)
DELETE /labels/:id : delete the "id" label.
|
org.springframework.http.ResponseEntity<java.util.List<Label>> |
getAllLabels(org.springframework.data.domain.Pageable pageable)
GET /labels : get all the labels.
|
org.springframework.http.ResponseEntity<Label> |
getLabel(java.lang.Long id)
GET /labels/:id : get the "id" label.
|
org.springframework.http.ResponseEntity<Label> |
updateLabel(Label label)
PUT /labels : Updates an existing label.
|
public LabelResource(LabelService labelService)
@PostMapping(value="/labels") @Timed public org.springframework.http.ResponseEntity<Label> createLabel(@RequestBody Label label) throws java.net.URISyntaxException
label
- the label to createjava.net.URISyntaxException
- if the Location URI syntax is incorrect@PutMapping(value="/labels") @Timed public org.springframework.http.ResponseEntity<Label> updateLabel(@RequestBody Label label) throws java.net.URISyntaxException
label
- the label to updatejava.net.URISyntaxException
- if the Location URI syntax is incorrect@GetMapping(value="/labels") @Timed public org.springframework.http.ResponseEntity<java.util.List<Label>> getAllLabels(org.springframework.data.domain.Pageable pageable)
pageable
- the pagination information@GetMapping(value="/labels/{id}") @Timed public org.springframework.http.ResponseEntity<Label> getLabel(@PathVariable java.lang.Long id)
id
- the id of the label to retrieve@DeleteMapping(value="/labels/{id}") @Timed public org.springframework.http.ResponseEntity<java.lang.Void> deleteLabel(@PathVariable java.lang.Long id)
id
- the id of the label to deleteCopyright © 2017 Osgiliath. All rights reserved.