Package de.trustable.ca3s.core.web.rest
Class CRLExpirationNotificationResource
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.CRLExpirationNotificationResource
-
@RestController @RequestMapping("/api") public class CRLExpirationNotificationResource extends ObjectREST controller for managingCRLExpirationNotification.
-
-
Constructor Summary
Constructors Constructor Description CRLExpirationNotificationResource(CRLExpirationNotificationService cRLExpirationNotificationService, CRLExpirationNotificationRepository cRLExpirationNotificationRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<CRLExpirationNotification>createCRLExpirationNotification(@Valid CRLExpirationNotification cRLExpirationNotification)POST /crl-expiration-notifications: Create a new cRLExpirationNotification.org.springframework.http.ResponseEntity<List<CRLExpirationNotification>>createCRLExpirationNotification(@Valid Long certificateId)POST /crl-expiration-notifications/certificate: Create a new cRLExpirationNotification.org.springframework.http.ResponseEntity<Void>deleteCRLExpirationNotification(Long id)DELETE /crl-expiration-notifications/:id: delete the "id" cRLExpirationNotification.List<CRLExpirationNotification>getAllCRLExpirationNotifications()GET /crl-expiration-notifications: get all the cRLExpirationNotifications.org.springframework.http.ResponseEntity<CRLExpirationNotification>getCRLExpirationNotification(Long id)GET /crl-expiration-notifications/:id: get the "id" cRLExpirationNotification.org.springframework.http.ResponseEntity<CRLExpirationNotification>updateCRLExpirationNotification(Long id, @Valid CRLExpirationNotification cRLExpirationNotification)PUT /crl-expiration-notifications/:id: Updates an existing cRLExpirationNotification.
-
-
-
Constructor Detail
-
CRLExpirationNotificationResource
public CRLExpirationNotificationResource(CRLExpirationNotificationService cRLExpirationNotificationService, CRLExpirationNotificationRepository cRLExpirationNotificationRepository)
-
-
Method Detail
-
createCRLExpirationNotification
@PostMapping("/crl-expiration-notifications") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<CRLExpirationNotification> createCRLExpirationNotification(@Valid @RequestBody @Valid CRLExpirationNotification cRLExpirationNotification) throws URISyntaxExceptionPOST /crl-expiration-notifications: Create a new cRLExpirationNotification.- Parameters:
cRLExpirationNotification- the cRLExpirationNotification to create.- Returns:
- the
ResponseEntitywith status201 (Created)and with body the new cRLExpirationNotification, or with status400 (Bad Request)if the cRLExpirationNotification has already an ID. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
createCRLExpirationNotification
@PostMapping("/crl-expiration-notifications/certificate") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<List<CRLExpirationNotification>> createCRLExpirationNotification(@Valid @RequestBody @Valid Long certificateId)POST /crl-expiration-notifications/certificate: Create a new cRLExpirationNotification.- Parameters:
certificateId- a certificate id to derive the details.- Returns:
- the
ResponseEntitywith status201 (Created)and with body the new cRLExpirationNotification, or with status400 (Bad Request)if the cRLExpirationNotification has already an ID.
-
updateCRLExpirationNotification
@PutMapping("/crl-expiration-notifications/{id}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<CRLExpirationNotification> updateCRLExpirationNotification(@PathVariable(value="id",required=false) Long id, @Valid @RequestBody @Valid CRLExpirationNotification cRLExpirationNotification)PUT /crl-expiration-notifications/:id: Updates an existing cRLExpirationNotification.- Parameters:
id- the id of the cRLExpirationNotification to save.cRLExpirationNotification- the cRLExpirationNotification to update.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the updated cRLExpirationNotification, or with status400 (Bad Request)if the cRLExpirationNotification is not valid, or with status500 (Internal Server Error)if the cRLExpirationNotification couldn't be updated. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
getAllCRLExpirationNotifications
@GetMapping("/crl-expiration-notifications") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public List<CRLExpirationNotification> getAllCRLExpirationNotifications()GET /crl-expiration-notifications: get all the cRLExpirationNotifications.- Returns:
- the
ResponseEntitywith status200 (OK)and the list of cRLExpirationNotifications in body.
-
getCRLExpirationNotification
@GetMapping("/crl-expiration-notifications/{id}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<CRLExpirationNotification> getCRLExpirationNotification(@PathVariable Long id)GET /crl-expiration-notifications/:id: get the "id" cRLExpirationNotification.- Parameters:
id- the id of the cRLExpirationNotification to retrieve.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the cRLExpirationNotification, or with status404 (Not Found).
-
deleteCRLExpirationNotification
@DeleteMapping("/crl-expiration-notifications/{id}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public org.springframework.http.ResponseEntity<Void> deleteCRLExpirationNotification(@PathVariable Long id)DELETE /crl-expiration-notifications/:id: delete the "id" cRLExpirationNotification.- Parameters:
id- the id of the cRLExpirationNotification to delete.- Returns:
- the
ResponseEntitywith status204 (NO_CONTENT).
-
-