Class CartApprovalEndpoint
java.lang.Object
com.broadleafcommerce.cartoperation.web.endpoint.CartApprovalEndpoint
@FrameworkRestController
@FrameworkMapping("/cart-approval")
public class CartApprovalEndpoint
extends Object
- Author:
- Susana Cruz (susanaccruz), Kyrylo Boiko (kboiko2)
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCartApprovalEndpoint
(CartResolverService cartResolverService, CartApprovalService cartApprovalService, CartProvider cartProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
cartNotFoundMessage
(String cartId) protected CartApprovalService
protected CartProvider
protected CartResolverService
rejectCart
(String cartId, CartApprovalProcessRequest cartApprovalProcessRequest, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected com.broadleafcommerce.cart.client.domain.Cart
resolveCart
(@NonNull String cartId, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart>
retrieveCartsRequiringApproval
(String requestedAccountId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) submitForApproval
(String cartId, CartApprovalProcessRequest cartApprovalProcessRequest, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
Field Details
-
BASE_URI
- See Also:
-
-
Constructor Details
-
CartApprovalEndpoint
public CartApprovalEndpoint(CartResolverService cartResolverService, CartApprovalService cartApprovalService, CartProvider cartProvider)
-
-
Method Details
-
retrieveCartsRequiringApproval
@Policy(permissionRoots="APPROVE_CART") @FrameworkGetMapping public org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart> retrieveCartsRequiringApproval(@RequestParam(value="requestedAccountId",required=false) String requestedAccountId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, cz.jirutka.rsql.parser.ast.Node filters, @PageableDefault(size=50,sort="approvalRequestedDate",direction=DESC) org.springframework.data.domain.Pageable pageable, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
submitForApproval
@FrameworkPostMapping(value="/{cartId}/submit-for-approval", consumes="application/json") public CartApprovalProcessResponse submitForApproval(@PathVariable String cartId, @RequestBody CartApprovalProcessRequest cartApprovalProcessRequest, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
rejectCart
@Policy(permissionRoots="APPROVE_CART") @FrameworkPostMapping(value="/{cartId}/reject-cart", consumes="application/json") public CartApprovalProcessResponse rejectCart(@PathVariable String cartId, @RequestBody CartApprovalProcessRequest cartApprovalProcessRequest, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
resolveCart
protected com.broadleafcommerce.cart.client.domain.Cart resolveCart(@NonNull @NonNull String cartId, @Nullable com.broadleafcommerce.order.common.domain.CustomerRef customer, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
cartNotFoundMessage
-
getCartResolverService
-
getCartApprovalService
-
getCartProvider
-