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