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