Class TmaCartsController
java.lang.Object
de.hybris.platform.b2ctelcoocc.controllers.BaseController
de.hybris.platform.b2ctelcoocc.controllers.TmaCartsController
@Controller
@RequestMapping("/{baseSiteId}/users/{userId}/carts")
public class TmaCartsController
extends BaseController
Controller for cart related requests such as retrieving/delete/update/... a cart
- Since:
- 1911
-
Field Summary
Fields inherited from class de.hybris.platform.b2ctelcoocc.controllers.BaseController
DEFAULT_FIELD_SET, FULL_FIELD_SET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCart(String oldCartId, String toMergeCartGuid, String userId, String fields) createCartEntry(String cartId, String userId, String baseSiteId, OrderEntryWsDTO entry, String fields) getCartEntry(long entryNumber, String fields) voidinitBinder(org.springframework.web.bind.WebDataBinder binder) voidremoveCartEntry(long entryNumber, String cartId, String userId) replaceCartEntry(String baseSiteId, long entryNumber, OrderEntryWsDTO entry, String fields) updateCartEntry(String baseSiteId, long entryNumber, OrderEntryWsDTO entry, String fields, String cartId, String userId) Methods inherited from class de.hybris.platform.b2ctelcoocc.controllers.BaseController
getDataMapper, getI18nService, getMessageSource, handleErrorInternal, handleModelNotFoundException, sanitize, setDataMapper, setI18nService, setMessageSource, validate
-
Constructor Details
-
TmaCartsController
public TmaCartsController()
-
-
Method Details
-
getCarts
@RequestMapping(method=GET) @ResponseBody public CartListWsDTO getCarts(@RequestParam(required=false,defaultValue="DEFAULT") String fields, @RequestParam(defaultValue="false") boolean savedCartsOnly, @RequestParam(defaultValue="0") int currentPage, @RequestParam(defaultValue="20") int pageSize, @RequestParam(required=false) String sort) -
getCart
-
createCartEntry
@RequestMapping(value="/{cartId}/entries", method=POST, consumes={"application/json","application/xml"}) @ResponseBody public CartModificationWsDTO createCartEntry(@PathVariable("cartId") String cartId, @PathVariable("userId") String userId, @PathVariable String baseSiteId, @RequestBody OrderEntryWsDTO entry, @RequestParam(defaultValue="DEFAULT") String fields) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException - Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
createCart
-
removeCartEntry
@RequestMapping(value="/{cartId}/entries/{entryNumber}", method=DELETE) @ResponseStatus(OK) public void removeCartEntry(@PathVariable long entryNumber, @PathVariable("cartId") String cartId, @PathVariable("userId") String userId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException - Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
updateCartEntry
@RequestMapping(value="/{cartId}/entries/{entryNumber}", method=PATCH, consumes={"application/json","application/xml"}) @ResponseBody public CartModificationWsDTO updateCartEntry(@PathVariable String baseSiteId, @PathVariable long entryNumber, @RequestBody OrderEntryWsDTO entry, @RequestParam(defaultValue="DEFAULT") String fields, @PathVariable("cartId") String cartId, @PathVariable("userId") String userId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException - Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
getCartEntry
@RequestMapping(value="/{cartId}/entries/{entryNumber}", method=GET) @ResponseBody public OrderEntryWsDTO getCartEntry(@PathVariable long entryNumber, @RequestParam(defaultValue="DEFAULT") String fields) -
replaceCartEntry
@RequestMapping(value="/{cartId}/entries/{entryNumber}", method=PUT, consumes={"application/json","application/xml"}) @ResponseBody public CartModificationWsDTO replaceCartEntry(@PathVariable String baseSiteId, @PathVariable long entryNumber, @RequestBody OrderEntryWsDTO entry, @RequestParam(defaultValue="DEFAULT") String fields) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException - Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
initBinder
@InitBinder public void initBinder(org.springframework.web.bind.WebDataBinder binder)
-