Package de.trustable.ca3s.core.web.rest
Class AcmeOrderResource
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.AcmeOrderResource
-
-
Constructor Summary
Constructors Constructor Description AcmeOrderResource(AcmeOrderService acmeOrderService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<AcmeOrder>createAcmeOrder(@Valid AcmeOrder acmeOrder)POST /acme-orders: Create a new acmeOrder.org.springframework.http.ResponseEntity<Void>deleteAcmeOrder(Long id)DELETE /acme-orders/:id: delete the "id" acmeOrder.org.springframework.http.ResponseEntity<AcmeOrder>getAcmeOrder(Long id)GET /acme-orders/:id: get the "id" acmeOrder.List<AcmeOrder>getAllAcmeOrders()GET /acme-orders: get all the acmeOrders.org.springframework.http.ResponseEntity<AcmeOrder>updateAcmeOrder(@Valid AcmeOrder acmeOrder)PUT /acme-orders: Updates an existing acmeOrder.
-
-
-
Constructor Detail
-
AcmeOrderResource
public AcmeOrderResource(AcmeOrderService acmeOrderService)
-
-
Method Detail
-
createAcmeOrder
@PostMapping("/acme-orders") public org.springframework.http.ResponseEntity<AcmeOrder> createAcmeOrder(@Valid @RequestBody @Valid AcmeOrder acmeOrder) throws URISyntaxExceptionPOST /acme-orders: Create a new acmeOrder.- Parameters:
acmeOrder- the acmeOrder to create.- Returns:
- the
ResponseEntitywith status201 (Created)and with body the new acmeOrder, or with status400 (Bad Request)if the acmeOrder has already an ID. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
updateAcmeOrder
@PutMapping("/acme-orders") public org.springframework.http.ResponseEntity<AcmeOrder> updateAcmeOrder(@Valid @RequestBody @Valid AcmeOrder acmeOrder) throws URISyntaxExceptionPUT /acme-orders: Updates an existing acmeOrder.- Parameters:
acmeOrder- the acmeOrder to update.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the updated acmeOrder, or with status400 (Bad Request)if the acmeOrder is not valid, or with status500 (Internal Server Error)if the acmeOrder couldn't be updated. - Throws:
URISyntaxException- if the Location URI syntax is incorrect.
-
getAllAcmeOrders
@GetMapping("/acme-orders") public List<AcmeOrder> getAllAcmeOrders()GET /acme-orders: get all the acmeOrders.- Returns:
- the
ResponseEntitywith status200 (OK)and the list of acmeOrders in body.
-
getAcmeOrder
@GetMapping("/acme-orders/{id}") public org.springframework.http.ResponseEntity<AcmeOrder> getAcmeOrder(@PathVariable Long id)GET /acme-orders/:id: get the "id" acmeOrder.- Parameters:
id- the id of the acmeOrder to retrieve.- Returns:
- the
ResponseEntitywith status200 (OK)and with body the acmeOrder, or with status404 (Not Found).
-
deleteAcmeOrder
@DeleteMapping("/acme-orders/{id}") public org.springframework.http.ResponseEntity<Void> deleteAcmeOrder(@PathVariable Long id)DELETE /acme-orders/:id: delete the "id" acmeOrder.- Parameters:
id- the id of the acmeOrder to delete.- Returns:
- the
ResponseEntitywith status204 (NO_CONTENT).
-
-