Class DefaultCartActionAuditOperationService<P extends com.broadleafcommerce.cart.client.domain.CartActionAudit>

java.lang.Object
com.broadleafcommerce.cartoperation.service.actionaudit.DefaultCartActionAuditOperationService<P>
All Implemented Interfaces:
CartActionAuditOperationService<P>

public class DefaultCartActionAuditOperationService<P extends com.broadleafcommerce.cart.client.domain.CartActionAudit> extends Object implements CartActionAuditOperationService<P>
Author:
Julia Lopez-Pozas (jlopezpozas)
  • Constructor Details

    • DefaultCartActionAuditOperationService

      public DefaultCartActionAuditOperationService(CartActionAuditProvider cartActionAuditProvider)
  • Method Details

    • readByCartId

      public org.springframework.data.domain.Page<P> readByCartId(@NonNull @NonNull String cartId, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: CartActionAuditOperationService
      Retrieves all cart action audits based on the given cart id.
      Specified by:
      readByCartId in interface CartActionAuditOperationService<P extends com.broadleafcommerce.cart.client.domain.CartActionAudit>
      Parameters:
      cartId - the id of the cart to find the action audits for
      contextInfo - context information around sandbox and multitenant state.
      Returns:
      the cart action audits based on the given cart id
    • cloneCartActionAuditsToCart

      public CloneCartActionAuditResponse cloneCartActionAuditsToCart(@NonNull @NonNull CloneCartActionAuditRequest cloneCartActionAuditRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: CartActionAuditOperationService
      Clones the CartActionAudits from one cart to another.

      This is typically used for preserving the quote history when cloning an DefaultQuoteStatuses.EXPIRED quote into a new one.

      Specified by:
      cloneCartActionAuditsToCart in interface CartActionAuditOperationService<P extends com.broadleafcommerce.cart.client.domain.CartActionAudit>
      Parameters:
      cloneCartActionAuditRequest - The CloneCartActionAuditRequest
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The CloneCartActionAuditResponse regarding the result of the clone
    • getCartActionAuditProvider

      protected CartActionAuditProvider getCartActionAuditProvider()