Package de.trustable.ca3s.core.web.rest
Class CsrAttributeResource
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.CsrAttributeResource
-
@RestController @RequestMapping("/api") public class CsrAttributeResource extends ObjectREST controller for managingCsrAttribute.
-
-
Constructor Summary
Constructors Constructor Description CsrAttributeResource(CsrAttributeService csrAttributeService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<CsrAttribute>createCsrAttribute(@Valid CsrAttribute csrAttribute)POST /csr-attributes: Create a new csrAttribute.org.springframework.http.ResponseEntity<Void>deleteCsrAttribute(Long id)DELETE /csr-attributes/:id: delete the "id" csrAttribute.List<CsrAttribute>getAllCsrAttributes()GET /csr-attributes: get all the csrAttributes.org.springframework.http.ResponseEntity<CsrAttribute>getCsrAttribute(Long id)GET /csr-attributes/:id: get the "id" csrAttribute.org.springframework.http.ResponseEntity<CsrAttribute>updateCsrAttribute(@Valid CsrAttribute csrAttribute)PUT /csr-attributes: Updates an existing csrAttribute.
-
-
-
Constructor Detail
-
CsrAttributeResource
public CsrAttributeResource(CsrAttributeService csrAttributeService)
-
-
Method Detail
-
createCsrAttribute
@PostMapping("/csr-attributes") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<CsrAttribute> createCsrAttribute(@Valid @RequestBody @Valid CsrAttribute csrAttribute) throws URISyntaxExceptionPOST /csr-attributes: Create a new csrAttribute.- Parameters:
csrAttribute- the csrAttribute to create.- Returns:
- the
ResponseEntitywith status201 (Created)and with body the new csrAttribute, or with status400 (Bad Request)if the csrAttribute has already an ID. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
updateCsrAttribute
@PutMapping("/csr-attributes") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<CsrAttribute> updateCsrAttribute(@Valid @RequestBody @Valid CsrAttribute csrAttribute) throws URISyntaxExceptionPUT /csr-attributes: Updates an existing csrAttribute.- Parameters:
csrAttribute- the csrAttribute to update.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the updated csrAttribute, or with status400 (Bad Request)if the csrAttribute is not valid, or with status500 (Internal Server Error)if the csrAttribute couldn't be updated. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
getAllCsrAttributes
@GetMapping("/csr-attributes") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public List<CsrAttribute> getAllCsrAttributes()GET /csr-attributes: get all the csrAttributes.- Returns:
- the
ResponseEntitywith status200 (OK)and the list of csrAttributes in body.
-
getCsrAttribute
@GetMapping("/csr-attributes/{id}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<CsrAttribute> getCsrAttribute(@PathVariable Long id)GET /csr-attributes/:id: get the "id" csrAttribute.- Parameters:
id- the id of the csrAttribute to retrieve.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the csrAttribute, or with status404 (Not Found).
-
deleteCsrAttribute
@DeleteMapping("/csr-attributes/{id}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<Void> deleteCsrAttribute(@PathVariable Long id)DELETE /csr-attributes/:id: delete the "id" csrAttribute.- Parameters:
id- the id of the csrAttribute to delete.- Returns:
- the
ResponseEntitywith status204 (NO_CONTENT).
-
-