@Service(value="blCategoryBreadcrumbServiceExtensionHandler") public class CategoryBreadcrumbServiceExtensionHandler extends AbstractBreadcrumbServiceExtensionHandler
| Modifier and Type | Field and Description |
|---|---|
protected CatalogService |
catalogService |
protected org.broadleafcommerce.common.breadcrumbs.service.BreadcrumbServiceExtensionManager |
extensionManager |
enabled, priority| Constructor and Description |
|---|
CategoryBreadcrumbServiceExtensionHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addParentCrumbs(List<org.broadleafcommerce.common.breadcrumbs.dto.BreadcrumbDTO> parentCrumbs,
Category category,
String url,
Map<String,String[]> params)
Add the parent crumb for the passed in category.
|
protected org.broadleafcommerce.common.breadcrumbs.dto.BreadcrumbDTO |
buildCategorySearchCrumb(Category category,
String url,
Map<String,String[]> params)
Hook for overrides, some implementations may want to build a crumb related to category filtering.
|
protected org.broadleafcommerce.common.breadcrumbs.dto.BreadcrumbDTO |
buildCrumbForCategory(Category category,
String url,
Map<String,String[]> params) |
protected Category |
determineFirstCategory(String testUrl,
Map<String,String[]> params,
org.broadleafcommerce.common.extension.ExtensionResultHolder<List<org.broadleafcommerce.common.breadcrumbs.dto.BreadcrumbDTO>> holder) |
protected Category |
getCategoryFromCategoryAttribute(org.broadleafcommerce.common.web.BroadleafRequestContext brc,
String testUrl,
Map<String,String[]> params)
This indicates that we are on a category page
|
protected Category |
getCategoryFromUrl(org.broadleafcommerce.common.web.BroadleafRequestContext brc,
String requestUrl,
Map<String,String[]> params) |
int |
getDefaultPriority()
Implementations must provide a priority for this extension handler as the
order determines the breadcrumb order.
|
protected Category |
getMatchingCategoryFromProduct(org.broadleafcommerce.common.web.BroadleafRequestContext brc,
String testUrl,
Map<String,String[]> params)
This is an efficient test that checks to see if the requestURI matches the product URI.
|
protected String |
getNameForCategoryLink(Category category) |
void |
init() |
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) |
buildLink, getPriority, isEnabled, setEnabled, setPriorityprotected CatalogService catalogService
protected org.broadleafcommerce.common.breadcrumbs.service.BreadcrumbServiceExtensionManager extensionManager
public CategoryBreadcrumbServiceExtensionHandler()
@PostConstruct public void init()
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)
modifyBreadcrumbList in interface org.broadleafcommerce.common.breadcrumbs.service.BreadcrumbServiceExtensionHandlermodifyBreadcrumbList in class AbstractBreadcrumbServiceExtensionHandlerprotected org.broadleafcommerce.common.breadcrumbs.dto.BreadcrumbDTO buildCrumbForCategory(Category category, String url, Map<String,String[]> params)
protected void addParentCrumbs(List<org.broadleafcommerce.common.breadcrumbs.dto.BreadcrumbDTO> parentCrumbs, Category category, String url, Map<String,String[]> params)
parentCrumbs - category - url - params - protected org.broadleafcommerce.common.breadcrumbs.dto.BreadcrumbDTO buildCategorySearchCrumb(Category category, String url, Map<String,String[]> params)
category - url - params - protected Category determineFirstCategory(String testUrl, Map<String,String[]> params, org.broadleafcommerce.common.extension.ExtensionResultHolder<List<org.broadleafcommerce.common.breadcrumbs.dto.BreadcrumbDTO>> holder)
protected Category getMatchingCategoryFromProduct(org.broadleafcommerce.common.web.BroadleafRequestContext brc, String testUrl, Map<String,String[]> params)
brc - testUrl - params - protected Category getCategoryFromCategoryAttribute(org.broadleafcommerce.common.web.BroadleafRequestContext brc, String testUrl, Map<String,String[]> params)
brc - testUrl - params - protected Category getCategoryFromUrl(org.broadleafcommerce.common.web.BroadleafRequestContext brc, String requestUrl, Map<String,String[]> params)
public int getDefaultPriority()
AbstractBreadcrumbServiceExtensionHandlergetDefaultPriority in class AbstractBreadcrumbServiceExtensionHandlerCopyright © 2015. All rights reserved.