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