Class DefaultProductModelUrlResolver
java.lang.Object
de.hybris.platform.commerceservices.url.impl.AbstractUrlResolver<ProductModel>
de.hybris.platform.commerceservices.url.impl.DefaultProductModelUrlResolver
- All Implemented Interfaces:
UrlResolver<ProductModel>
URL resolver for ProductModel instances. The pattern could be of the form:
/{category-path}/{product-name}/p/{product-code}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildPathString(List<CategoryModel> path) protected BaseSiteServiceprotected List<CategoryModel>getCategoryPath(CategoryModel category) protected List<CategoryModel>getCategoryPath(ProductModel product) protected CommerceCategoryServiceprotected Stringprotected StringgetKey(ProductModel source) Get the cache key for the source instance.protected Stringprotected CategoryModelgetPrimaryCategoryForProduct(ProductModel product) protected ProductAndCategoryHelperprotected StringresolveInternal(ProductModel source) Resolve the url path for the source type.voidsetBaseSiteService(BaseSiteService baseSiteService) voidsetCommerceCategoryService(CommerceCategoryService commerceCategoryService) voidsetDefaultPattern(String defaultPattern) voidsetProductAndCategoryHelper(ProductAndCategoryHelper productAndCategoryHelper) Methods inherited from class de.hybris.platform.commerceservices.url.impl.AbstractUrlResolver
getThreadContextService, resolve, setThreadContextService, urlEncode, urlSafe
-
Constructor Details
-
DefaultProductModelUrlResolver
public DefaultProductModelUrlResolver()
-
-
Method Details
-
getDefaultPattern
-
setDefaultPattern
-
getBaseSiteService
-
setBaseSiteService
-
getCommerceCategoryService
-
setCommerceCategoryService
-
getProductAndCategoryHelper
-
setProductAndCategoryHelper
-
getPattern
-
getKey
Description copied from class:AbstractUrlResolverGet the cache key for the source instance.- Overrides:
getKeyin classAbstractUrlResolver<ProductModel>- Parameters:
source- the source instance- Returns:
- the cache key or null if caching is not supported
-
resolveInternal
Description copied from class:AbstractUrlResolverResolve the url path for the source type.- Specified by:
resolveInternalin classAbstractUrlResolver<ProductModel>- Parameters:
source- the source type.- Returns:
- the URL path
-
buildPathString
-
getCategoryPath
-
getPrimaryCategoryForProduct
-
getCategoryPath
-