Class OrderFormsController
java.lang.Object
de.hybris.platform.savedorderformsocc.v2.controllers.OrderFormsController
@Controller
@RequestMapping("/{baseSiteId}/orderforms")
public class OrderFormsController
extends Object
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateOrderForm(OrderFormWsDTO orderFormWsDTO) Creates an Order FormvoiddeleteOrderForm(String orderFormCode) Deletes an order form.getOrderFormForCode(String orderFormCode, String fields) Gets a saved Order FormgetOrderFormsForCurrentUser(String fields) Gets a list of saved Order Form for the current user.voidAdds an order form to the cart.updateOrderForm(String orderFormCode, String fields, OrderFormWsDTO orderFormWsDTO) Updates an order form.
-
Field Details
-
orderFormFacade
-
-
Constructor Details
-
OrderFormsController
public OrderFormsController()
-
-
Method Details
-
getOrderFormForCode
@ResponseBody @GetMapping("/{orderFormCode}") @Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) public OrderFormWsDTO getOrderFormForCode(@PathVariable String orderFormCode, @RequestParam(defaultValue="DEFAULT") String fields) Gets a saved Order Form- Parameters:
orderFormCode- the order form code to be fetched- Returns:
- a representation of
OrderFormWsDTO
-
getOrderFormsForCurrentUser
@ResponseBody @GetMapping @Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) public OrderFormListWsDTO getOrderFormsForCurrentUser(@RequestParam(defaultValue="DEFAULT") String fields) Gets a list of saved Order Form for the current user.- Returns:
- a representation of
OrderFormListWsDTO
-
createOrderForm
@ResponseStatus(CREATED) @Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) @PostMapping(consumes={"application/json","application/xml"}) public void createOrderForm(@RequestBody OrderFormWsDTO orderFormWsDTO) Creates an Order Form -
updateOrderForm
@ResponseBody @Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) @PutMapping(value="/{orderFormCode}", consumes="application/json") public OrderFormWsDTO updateOrderForm(@PathVariable String orderFormCode, @RequestParam(defaultValue="DEFAULT") String fields, @RequestBody(required=true) OrderFormWsDTO orderFormWsDTO) Updates an order form.- Parameters:
orderFormCode- the order form code to be updated- Returns:
- a representation of
OrderFormWsDTO
-
deleteOrderForm
@ResponseStatus(NO_CONTENT) @DeleteMapping("/{orderFormCode}") @Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) public void deleteOrderForm(@PathVariable String orderFormCode) Deletes an order form.- Parameters:
orderFormCode- the order form code to be deleted
-
orderForm
@ResponseStatus(NO_CONTENT) @Secured({"ROLE_CUSTOMERGROUP","ROLE_TRUSTED_CLIENT","ROLE_CUSTOMERMANAGERGROUP"}) @PostMapping("/{orderFormCode}/cart") public void orderForm(@PathVariable String orderFormCode, @RequestParam(defaultValue="DEFAULT") String fields) throws CommerceCartModificationException Adds an order form to the cart.- Parameters:
orderFormCode- the order form code to be updated- Throws:
CommerceCartModificationException
-