Class CartEntriesController
java.lang.Object
de.hybris.platform.commercewebservices.core.v2.controller.BaseController
de.hybris.platform.commercewebservices.core.v2.controller.BaseCommerceController
de.hybris.platform.commercewebservices.core.v2.controller.CartEntriesController
@Controller
@RequestMapping("/{baseSiteId}/users/{userId}/carts")
public class CartEntriesController
extends BaseCommerceController
-
Field Summary
Fields inherited from class de.hybris.platform.commercewebservices.core.v2.controller.BaseCommerceController
API_COMPATIBILITY_B2C_CHANNELS, ENTRYFields inherited from class de.hybris.platform.commercewebservices.core.v2.controller.BaseController
BASIC_FIELD_SET, DEFAULT_CURRENT_PAGE, DEFAULT_FIELD_SET, DEFAULT_PAGE_SIZE, HEADER_TOTAL_COUNT, INVALID_REQUEST_BODY_ERROR_MESSAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CartModificationWsDTOaddCartEntryInternal(String baseSiteId, String code, long qty, String pickupStore, String fields) createCartEntry(String baseSiteId, OrderEntryWsDTO entry, String fields) getCartEntries(String fields) getCartEntry(long entryNumber, String fields) protected static OrderEntryDatagetCartEntry(CartData cart, String productCode, String pickupStore) protected static OrderEntryDatagetCartEntryForNumber(CartData cart, long number) protected static CartModificationDatavoidremoveCartEntry(long entryNumber) replaceCartEntry(String baseSiteId, long entryNumber, OrderEntryWsDTO entry, String fields) updateCartEntry(String baseSiteId, long entryNumber, OrderEntryWsDTO entry, String fields) protected CartModificationWsDTOupdateCartEntryInternal(String baseSiteId, CartData cart, OrderEntryData orderEntry, Long qty, String pickupStore, String fields, boolean putMode) protected static voidvalidateForAmbiguousPositions(CartData currentCart, OrderEntryData currentEntry, String newPickupStore) protected static voidvalidateProductCode(OrderEntryData originalEntry, OrderEntryWsDTO entry) Methods inherited from class de.hybris.platform.commercewebservices.core.v2.controller.BaseCommerceController
addPaymentDetailsInternal, applyVoucherForCartInternal, createAddressInternal, createAddressInternal, getAddressDTOValidator, getAddressValidator, getCartFacade, getCartVoucherValidator, getCcPaymentInfoValidator, getCheckoutFacade, getDeliveryAddressValidator, getHttpRequestAddressDataPopulator, getHttpRequestPaymentInfoPopulator, getPaymentDetailsDTOValidator, getSessionCart, getUserFacade, getVoucherFacade, setAddressDTOValidator, setAddressValidator, setCartDeliveryAddressInternal, setCartDeliveryModeInternal, setCartFacade, setCcPaymentInfoValidator, setCheckoutFacade, setDeliveryAddressValidator, setHttpRequestAddressDataPopulator, setHttpRequestPaymentInfoPopulator, setPaymentDetailsDTOValidator, setPaymentDetailsInternal, setUserFacade, setVoucherFacade, validateCartForPlaceOrder, validateStatusesEnumValueMethods inherited from class de.hybris.platform.commercewebservices.core.v2.controller.BaseController
addPaginationField, getDataMapper, handleDuplicateUidException, handleErrorInternal, handleHttpMessageNotReadableException, handleModelNotFoundException, logParam, logParam, logValue, sanitize, setDataMapper, setTotalCountHeader, setTotalCountHeader, validate
-
Constructor Details
-
CartEntriesController
public CartEntriesController()
-
-
Method Details
-
mergeCartModificationData
protected static CartModificationData mergeCartModificationData(CartModificationData cmd1, CartModificationData cmd2) -
getCartEntryForNumber
-
getCartEntry
-
validateForAmbiguousPositions
protected static void validateForAmbiguousPositions(CartData currentCart, OrderEntryData currentEntry, String newPickupStore) -
validateProductCode
-
getCartEntries
@GetMapping("/{cartId}/entries") @ResponseBody public OrderEntryListWsDTO getCartEntries(@RequestParam(defaultValue="DEFAULT") String fields) -
createCartEntry
@PostMapping(value="/{cartId}/entries", consumes={"application/json","application/xml"}) @ResponseBody @SiteChannelRestriction(allowedSiteChannelsProperty="api.compatibility.b2c.channels") public CartModificationWsDTO createCartEntry(@PathVariable String baseSiteId, @RequestBody OrderEntryWsDTO entry, @RequestParam(defaultValue="DEFAULT") String fields) throws CommerceCartModificationException -
getCartEntry
@GetMapping("/{cartId}/entries/{entryNumber}") @ResponseBody public OrderEntryWsDTO getCartEntry(@PathVariable long entryNumber, @RequestParam(defaultValue="DEFAULT") String fields) -
replaceCartEntry
@PutMapping(value="/{cartId}/entries/{entryNumber}", consumes={"application/json","application/xml"}) @ResponseBody @SiteChannelRestriction(allowedSiteChannelsProperty="api.compatibility.b2c.channels") public CartModificationWsDTO replaceCartEntry(@PathVariable String baseSiteId, @PathVariable long entryNumber, @RequestBody OrderEntryWsDTO entry, @RequestParam(defaultValue="DEFAULT") String fields) throws CommerceCartModificationException -
updateCartEntry
@PatchMapping(value="/{cartId}/entries/{entryNumber}", consumes={"application/json","application/xml"}) @ResponseBody public CartModificationWsDTO updateCartEntry(@PathVariable String baseSiteId, @PathVariable long entryNumber, @RequestBody OrderEntryWsDTO entry, @RequestParam(defaultValue="DEFAULT") String fields) throws CommerceCartModificationException -
removeCartEntry
@DeleteMapping("/{cartId}/entries/{entryNumber}") @ResponseStatus(OK) public void removeCartEntry(@PathVariable long entryNumber) throws CommerceCartModificationException -
addCartEntryInternal
protected CartModificationWsDTO addCartEntryInternal(String baseSiteId, String code, long qty, String pickupStore, String fields) throws CommerceCartModificationException -
updateCartEntryInternal
protected CartModificationWsDTO updateCartEntryInternal(String baseSiteId, CartData cart, OrderEntryData orderEntry, Long qty, String pickupStore, String fields, boolean putMode) throws CommerceCartModificationException
-