Class ProductBreadcrumbServiceExtensionHandler
java.lang.Object
org.broadleafcommerce.core.web.breadcrumbs.AbstractBreadcrumbServiceExtensionHandler
org.broadleafcommerce.core.web.breadcrumbs.ProductBreadcrumbServiceExtensionHandler
- All Implemented Interfaces:
BreadcrumbServiceExtensionHandler,ExtensionHandler
@Service("blProductBreadcrumbServiceExtensionHandler")
public class ProductBreadcrumbServiceExtensionHandler
extends AbstractBreadcrumbServiceExtensionHandler
Adds a product breadcrumb using the product on the BroadleafRequestContext.
- Author:
- bpolster
-
Field Summary
FieldsFields inherited from class org.broadleafcommerce.core.web.breadcrumbs.AbstractBreadcrumbServiceExtensionHandler
enabled, priority -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ProductdetermineProduct(String url, Map<String, String[]> params, ExtensionResultHolder<List<BreadcrumbDTO>> holder) intImplementations must provide a priority for this extension handler as the order determines the breadcrumb order.protected StringgetNameForProductLink(Product product) protected Stringvoidinit()modifyBreadcrumbList(String url, Map<String, String[]> params, ExtensionResultHolder<List<BreadcrumbDTO>> holder) protected voidupdateContextMap(String origUrl, Map<String, String[]> params, ExtensionResultHolder<List<BreadcrumbDTO>> holder) Remove the productId and the last fragment of the URLMethods inherited from class org.broadleafcommerce.core.web.breadcrumbs.AbstractBreadcrumbServiceExtensionHandler
buildLink, getPriority, isEnabled, setEnabled, setPriority
-
Field Details
-
extensionManager
-
-
Constructor Details
-
ProductBreadcrumbServiceExtensionHandler
public ProductBreadcrumbServiceExtensionHandler()
-
-
Method Details
-
init
@PostConstruct public void init() -
modifyBreadcrumbList
public ExtensionResultStatusType modifyBreadcrumbList(String url, Map<String, String[]> params, ExtensionResultHolder<List<BreadcrumbDTO>> holder) - Specified by:
modifyBreadcrumbListin interfaceBreadcrumbServiceExtensionHandler- Overrides:
modifyBreadcrumbListin classAbstractBreadcrumbServiceExtensionHandler
-
determineProduct
protected Product determineProduct(String url, Map<String, String[]> params, ExtensionResultHolder<List<BreadcrumbDTO>> holder) -
getNameForProductLink
-
updateContextMap
protected void updateContextMap(String origUrl, Map<String, String[]> params, ExtensionResultHolder<List<BreadcrumbDTO>> holder) Remove the productId and the last fragment of the URL- Parameters:
params-holder-
-
getProductIdParam
-
getDefaultPriority
public int getDefaultPriority()Description copied from class:AbstractBreadcrumbServiceExtensionHandlerImplementations must provide a priority for this extension handler as the order determines the breadcrumb order.- Specified by:
getDefaultPriorityin classAbstractBreadcrumbServiceExtensionHandler- Returns:
-