Package de.trustable.ca3s.core.web.rest
Class CSRResource
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.CSRResource
-
-
Constructor Summary
Constructors Constructor Description CSRResource(CSRService cSRService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<CSR>createCSR(@Valid CSR cSR)POST /csrs: Create a new cSR.org.springframework.http.ResponseEntity<Void>deleteCSR(Long id)DELETE /csrs/:id: delete the "id" cSR.List<CSR>getAllCSRS(String filter)GET /csrs: get all the cSRS.org.springframework.http.ResponseEntity<CSR>getCSR(Long id)GET /csrs/:id: get the "id" cSR.org.springframework.http.ResponseEntity<CSR>updateCSR(@Valid CSR cSR)PUT /csrs: Updates an existing cSR.
-
-
-
Constructor Detail
-
CSRResource
public CSRResource(CSRService cSRService)
-
-
Method Detail
-
createCSR
@PostMapping("/csrs") public org.springframework.http.ResponseEntity<CSR> createCSR(@Valid @RequestBody @Valid CSR cSR) throws URISyntaxExceptionPOST /csrs: Create a new cSR.- Parameters:
cSR- the cSR to create.- Returns:
- the
ResponseEntitywith status201 (Created)and with body the new cSR, or with status400 (Bad Request)if the cSR has already an ID. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
updateCSR
@PutMapping("/csrs") public org.springframework.http.ResponseEntity<CSR> updateCSR(@Valid @RequestBody @Valid CSR cSR) throws URISyntaxExceptionPUT /csrs: Updates an existing cSR.- Parameters:
cSR- the cSR to update.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the updated cSR, or with status400 (Bad Request)if the cSR is not valid, or with status500 (Internal Server Error)if the cSR couldn't be updated. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
getAllCSRS
@GetMapping("/csrs") public List<CSR> getAllCSRS(@RequestParam(required=false) String filter)GET /csrs: get all the cSRS.- Parameters:
filter- the filter of the request.- Returns:
- the
ResponseEntitywith status200 (OK)and the list of cSRS in body.
-
getCSR
@GetMapping("/csrs/{id}") public org.springframework.http.ResponseEntity<CSR> getCSR(@PathVariable Long id)GET /csrs/:id: get the "id" cSR.- Parameters:
id- the id of the cSR to retrieve.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the cSR, or with status404 (Not Found).
-
-