Class CartEntriesController
- java.lang.Object
-
- de.hybris.platform.ycommercewebservices.v2.controller.BaseController
-
- de.hybris.platform.ycommercewebservices.v2.controller.BaseCommerceController
-
- de.hybris.platform.ycommercewebservices.v2.controller.CartEntriesController
-
@Controller @RequestMapping("/{baseSiteId}/users/{userId}/carts") public class CartEntriesController extends BaseCommerceController
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.ycommercewebservices.v2.controller.BaseCommerceController
API_COMPATIBILITY_B2C_CHANNELS, ENTRY
-
Fields inherited from class de.hybris.platform.ycommercewebservices.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 Constructor Description CartEntriesController()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CartModificationWsDTOaddCartEntryInternal(java.lang.String baseSiteId, java.lang.String code, long qty, java.lang.String pickupStore, java.lang.String fields)CartModificationWsDTOcreateCartEntry(java.lang.String baseSiteId, OrderEntryWsDTO entry, java.lang.String fields)OrderEntryListWsDTOgetCartEntries(java.lang.String fields)OrderEntryWsDTOgetCartEntry(long entryNumber, java.lang.String fields)protected static OrderEntryDatagetCartEntry(CartData cart, java.lang.String productCode, java.lang.String pickupStore)protected static OrderEntryDatagetCartEntryForNumber(CartData cart, long number)protected static CartModificationDatamergeCartModificationData(CartModificationData cmd1, CartModificationData cmd2)voidremoveCartEntry(long entryNumber)CartModificationWsDTOreplaceCartEntry(java.lang.String baseSiteId, long entryNumber, OrderEntryWsDTO entry, java.lang.String fields)CartModificationWsDTOupdateCartEntry(java.lang.String baseSiteId, long entryNumber, OrderEntryWsDTO entry, java.lang.String fields)protected CartModificationWsDTOupdateCartEntryInternal(java.lang.String baseSiteId, CartData cart, OrderEntryData orderEntry, java.lang.Long qty, java.lang.String pickupStore, java.lang.String fields, boolean putMode)protected static voidvalidateForAmbiguousPositions(CartData currentCart, OrderEntryData currentEntry, java.lang.String newPickupStore)protected static voidvalidateProductCode(OrderEntryData originalEntry, OrderEntryWsDTO entry)-
Methods inherited from class de.hybris.platform.ycommercewebservices.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, validateStatusesEnumValue
-
Methods inherited from class de.hybris.platform.ycommercewebservices.v2.controller.BaseController
addPaginationField, getDataMapper, handleDuplicateUidException, handleErrorInternal, handleHttpMessageNotReadableException, handleModelNotFoundException, logParam, logParam, logValue, sanitize, setDataMapper, setTotalCountHeader, setTotalCountHeader, validate
-
-
-
-
Method Detail
-
mergeCartModificationData
protected static CartModificationData mergeCartModificationData(CartModificationData cmd1, CartModificationData cmd2)
-
getCartEntryForNumber
protected static OrderEntryData getCartEntryForNumber(CartData cart, long number)
-
getCartEntry
protected static OrderEntryData getCartEntry(CartData cart, java.lang.String productCode, java.lang.String pickupStore)
-
validateForAmbiguousPositions
protected static void validateForAmbiguousPositions(CartData currentCart, OrderEntryData currentEntry, java.lang.String newPickupStore)
-
validateProductCode
protected static void validateProductCode(OrderEntryData originalEntry, OrderEntryWsDTO entry)
-
getCartEntries
@GetMapping("/{cartId}/entries") @ResponseBody public OrderEntryListWsDTO getCartEntries(@RequestParam(defaultValue="DEFAULT") java.lang.String fields)
-
createCartEntry
@PostMapping(value="/{cartId}/entries", consumes={"application/json","application/xml"}) @ResponseBody @SiteChannelRestriction(allowedSiteChannelsProperty="api.compatibility.b2c.channels") public CartModificationWsDTO createCartEntry(@PathVariable java.lang.String baseSiteId, @RequestBody OrderEntryWsDTO entry, @RequestParam(defaultValue="DEFAULT") java.lang.String fields) throws CommerceCartModificationException
-
getCartEntry
@GetMapping("/{cartId}/entries/{entryNumber}") @ResponseBody public OrderEntryWsDTO getCartEntry(@PathVariable long entryNumber, @RequestParam(defaultValue="DEFAULT") java.lang.String fields)
-
replaceCartEntry
@PutMapping(value="/{cartId}/entries/{entryNumber}", consumes={"application/json","application/xml"}) @ResponseBody @SiteChannelRestriction(allowedSiteChannelsProperty="api.compatibility.b2c.channels") public CartModificationWsDTO replaceCartEntry(@PathVariable java.lang.String baseSiteId, @PathVariable long entryNumber, @RequestBody OrderEntryWsDTO entry, @RequestParam(defaultValue="DEFAULT") java.lang.String fields) throws CommerceCartModificationException
-
updateCartEntry
@PatchMapping(value="/{cartId}/entries/{entryNumber}", consumes={"application/json","application/xml"}) @ResponseBody public CartModificationWsDTO updateCartEntry(@PathVariable java.lang.String baseSiteId, @PathVariable long entryNumber, @RequestBody OrderEntryWsDTO entry, @RequestParam(defaultValue="DEFAULT") java.lang.String fields) throws CommerceCartModificationException
-
removeCartEntry
@DeleteMapping("/{cartId}/entries/{entryNumber}") @ResponseStatus(OK) public void removeCartEntry(@PathVariable long entryNumber) throws CommerceCartModificationException
-
addCartEntryInternal
protected CartModificationWsDTO addCartEntryInternal(java.lang.String baseSiteId, java.lang.String code, long qty, java.lang.String pickupStore, java.lang.String fields) throws CommerceCartModificationException
-
updateCartEntryInternal
protected CartModificationWsDTO updateCartEntryInternal(java.lang.String baseSiteId, CartData cart, OrderEntryData orderEntry, java.lang.Long qty, java.lang.String pickupStore, java.lang.String fields, boolean putMode) throws CommerceCartModificationException
-
-