Class ResolveCartEndpoint
java.lang.Object
com.broadleafcommerce.cartoperation.web.endpoint.ResolveCartEndpoint
@FrameworkRestController
@FrameworkMapping("/resolve-cart")
@DataRouteByKey("cartoperation")
public class ResolveCartEndpoint
extends Object
- Author:
- Nick Crum (ncrum)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtilsstatic final Stringprotected final CartResolverService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtilsprotected CartResolverServicecom.broadleafcommerce.cart.client.domain.CartresolveCart(List<String> status, com.broadleafcommerce.order.common.domain.CustomerRef registeredCustomer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Resolves the registered customer's implicit cart.voidsetAuthenticationUtils(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils)
-
Field Details
-
BASE_URI
- See Also:
-
cartResolverService
-
authenticationUtils
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils
-
-
Constructor Details
-
ResolveCartEndpoint
-
-
Method Details
-
resolveCart
@FrameworkGetMapping public com.broadleafcommerce.cart.client.domain.Cart resolveCart(@RequestParam(required=false) List<String> status, com.broadleafcommerce.order.common.domain.CustomerRef registeredCustomer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Resolves the registered customer's implicit cart. Out of the box, the default/implicit cart means aDefaultCartStatuses.IN_PROCESSwithnullname, and there should only be one default/implicit cart per user.- Parameters:
status- the cart statuses. This is only used if the user is a CSR.registeredCustomer- theCustomerRefrepresenting the registered customercontextInfo- context information related to multitenancy- Returns:
- the registered customer's implicit cart
- Throws:
CartNotFoundException- if the implicit cart cannot be found
-
cartNotFoundMessage
-
getCartResolverService
-
setAuthenticationUtils
@Autowired public void setAuthenticationUtils(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils) -
getAuthenticationUtils
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthenticationUtils()
-