Class AcmeOrderResource


  • @RestController
    @RequestMapping("/api")
    public class AcmeOrderResource
    extends Object
    REST controller for managing 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 URISyntaxException
        POST /acme-orders : Create a new acmeOrder.
        Parameters:
        acmeOrder - the acmeOrder to create.
        Returns:
        the ResponseEntity with status 201 (Created) and with body the new acmeOrder, or with status 400 (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 URISyntaxException
        PUT /acme-orders : Updates an existing acmeOrder.
        Parameters:
        acmeOrder - the acmeOrder to update.
        Returns:
        the ResponseEntity with status 200 (OK) and with body the updated acmeOrder, or with status 400 (Bad Request) if the acmeOrder is not valid, or with status 500 (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 ResponseEntity with status 200 (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 ResponseEntity with status 200 (OK) and with body the acmeOrder, or with status 404 (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 ResponseEntity with status 204 (NO_CONTENT).