Package com.cyran.tp.server.orders
Class OrderControllerRDBS
java.lang.Object
com.cyran.tp.server.orders.OrderControllerRDBS
@RestController
public class OrderControllerRDBS
extends java.lang.Object
Managing order creation and other manipulation with order
- Author:
- Jakub Perdek
-
Constructor Summary
Constructors Constructor Description OrderControllerRDBS()
-
Method Summary
Modifier and Type Method Description com.fasterxml.jackson.databind.JsonNode
createOrder(javax.servlet.http.HttpServletRequest request, java.lang.String body, javax.servlet.http.HttpServletResponse response)
Method for creating order
-
Constructor Details
-
OrderControllerRDBS
public OrderControllerRDBS()
-
-
Method Details
-
createOrder
@RequestMapping(path="/eorder/insert", method=POST, produces="application/json") @ResponseBody @CrossOrigin public com.fasterxml.jackson.databind.JsonNode createOrder(javax.servlet.http.HttpServletRequest request, @RequestBody java.lang.String body, javax.servlet.http.HttpServletResponse response) throws java.lang.InterruptedException, org.json.simple.parser.ParseExceptionMethod for creating order- Parameters:
request
- - request for creation orderbody
- - body of post request with all order informationresponse
- - response which should be send back- Returns:
- JSON with all products or only information that order is created
- Throws:
java.lang.InterruptedException
- for interruptionsorg.json.simple.parser.ParseException
- if parsing request JSON body went wrong
-