Package de.trustable.ca3s.core.web.rest
Class AuditTraceResource
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.AuditTraceResource
-
@RestController @RequestMapping("/api") public class AuditTraceResource extends ObjectREST controller for managingAuditTrace.
-
-
Constructor Summary
Constructors Constructor Description AuditTraceResource(AuditTraceService auditTraceService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<AuditTrace>createAuditTrace(@Valid AuditTrace auditTrace)POST /audit-traces: Create a new auditTrace.org.springframework.http.ResponseEntity<Void>deleteAuditTrace(Long id)DELETE /audit-traces/:id: delete the "id" auditTrace.org.springframework.data.domain.Page<AuditTrace>getAllAuditTraces(org.springframework.data.domain.Pageable pageable, Long certificateId, Long csrId, Long pipelineId, Long caConnectorId, Long processInfoId)GET /audit-traces: get all the auditTraces.org.springframework.http.ResponseEntity<AuditTrace>getAuditTrace(Long id)GET /audit-traces/:id: get the "id" auditTrace.org.springframework.http.ResponseEntity<AuditTrace>updateAuditTrace(@Valid AuditTrace auditTrace)PUT /audit-traces: Updates an existing auditTrace.
-
-
-
Constructor Detail
-
AuditTraceResource
public AuditTraceResource(AuditTraceService auditTraceService)
-
-
Method Detail
-
createAuditTrace
@PostMapping("/audit-traces") public org.springframework.http.ResponseEntity<AuditTrace> createAuditTrace(@Valid @RequestBody @Valid AuditTrace auditTrace) throws URISyntaxExceptionPOST /audit-traces: Create a new auditTrace.- Parameters:
auditTrace- the auditTrace to create.- Returns:
- the
ResponseEntitywith status201 (Created)and with body the new auditTrace, or with status400 (Bad Request)if the auditTrace has already an ID. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
updateAuditTrace
@PutMapping("/audit-traces") public org.springframework.http.ResponseEntity<AuditTrace> updateAuditTrace(@Valid @RequestBody @Valid AuditTrace auditTrace) throws URISyntaxExceptionPUT /audit-traces: Updates an existing auditTrace.- Parameters:
auditTrace- the auditTrace to update.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the updated auditTrace, or with status400 (Bad Request)if the auditTrace is not valid, or with status500 (Internal Server Error)if the auditTrace couldn't be updated. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
getAllAuditTraces
@GetMapping("/audit-traces") public org.springframework.data.domain.Page<AuditTrace> getAllAuditTraces(org.springframework.data.domain.Pageable pageable, @RequestParam(value="certificate",required=false) Long certificateId, @RequestParam(value="csr",required=false) Long csrId, @RequestParam(value="pipeline",required=false) Long pipelineId, @RequestParam(value="caConnector",required=false) Long caConnectorId, @RequestParam(value="processInfo",required=false) Long processInfoId)GET /audit-traces: get all the auditTraces.- Returns:
- the
ResponseEntitywith status200 (OK)and the list of auditTraces in body.
-
getAuditTrace
@GetMapping("/audit-traces/{id}") public org.springframework.http.ResponseEntity<AuditTrace> getAuditTrace(@PathVariable Long id)GET /audit-traces/:id: get the "id" auditTrace.- Parameters:
id- the id of the auditTrace to retrieve.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the auditTrace, or with status404 (Not Found).
-
deleteAuditTrace
@DeleteMapping("/audit-traces/{id}") public org.springframework.http.ResponseEntity<Void> deleteAuditTrace(@PathVariable Long id)DELETE /audit-traces/:id: delete the "id" auditTrace.- Parameters:
id- the id of the auditTrace to delete.- Returns:
- the
ResponseEntitywith status204 (NO_CONTENT).
-
-