Class ProductBreadcrumbServiceExtensionHandler

java.lang.Object
org.broadleafcommerce.core.web.breadcrumbs.AbstractBreadcrumbServiceExtensionHandler
org.broadleafcommerce.core.web.breadcrumbs.ProductBreadcrumbServiceExtensionHandler
All Implemented Interfaces:
org.broadleafcommerce.common.breadcrumbs.service.BreadcrumbServiceExtensionHandler, org.broadleafcommerce.common.extension.ExtensionHandler

@Service("blProductBreadcrumbServiceExtensionHandler") public class ProductBreadcrumbServiceExtensionHandler extends AbstractBreadcrumbServiceExtensionHandler
Adds a product breadcrumb using the product on the BroadleafRequestContext.
Author:
bpolster
  • Field Details

    • extensionManager

      protected org.broadleafcommerce.common.breadcrumbs.service.BreadcrumbServiceExtensionManager extensionManager
  • Constructor Details

    • ProductBreadcrumbServiceExtensionHandler

      public ProductBreadcrumbServiceExtensionHandler()
  • Method Details

    • init

      @PostConstruct public void init()
    • modifyBreadcrumbList

      public org.broadleafcommerce.common.extension.ExtensionResultStatusType modifyBreadcrumbList(String url, Map<String,String[]> params, org.broadleafcommerce.common.extension.ExtensionResultHolder<List<org.broadleafcommerce.common.breadcrumbs.dto.BreadcrumbDTO>> holder)
      Specified by:
      modifyBreadcrumbList in interface org.broadleafcommerce.common.breadcrumbs.service.BreadcrumbServiceExtensionHandler
      Overrides:
      modifyBreadcrumbList in class AbstractBreadcrumbServiceExtensionHandler
    • determineProduct

      protected org.broadleafcommerce.core.catalog.domain.Product determineProduct(String url, Map<String,String[]> params, org.broadleafcommerce.common.extension.ExtensionResultHolder<List<org.broadleafcommerce.common.breadcrumbs.dto.BreadcrumbDTO>> holder)
    • getNameForProductLink

      protected String getNameForProductLink(org.broadleafcommerce.core.catalog.domain.Product product)
    • updateContextMap

      protected void updateContextMap(String origUrl, Map<String,String[]> params, org.broadleafcommerce.common.extension.ExtensionResultHolder<List<org.broadleafcommerce.common.breadcrumbs.dto.BreadcrumbDTO>> holder)
      Remove the productId and the last fragment of the URL
      Parameters:
      params -
      holder -
    • getProductIdParam

      protected String getProductIdParam()
    • getDefaultPriority

      public int getDefaultPriority()
      Description copied from class: AbstractBreadcrumbServiceExtensionHandler
      Implementations must provide a priority for this extension handler as the order determines the breadcrumb order.
      Specified by:
      getDefaultPriority in class AbstractBreadcrumbServiceExtensionHandler
      Returns: