Class ApparelSizeProductReferenceTargetStrategy
java.lang.Object
de.hybris.platform.yacceleratorcore.strategies.impl.ApparelSizeProductReferenceTargetStrategy
- All Implemented Interfaces:
ProductReferenceTargetStrategy
public class ApparelSizeProductReferenceTargetStrategy
extends Object
implements ProductReferenceTargetStrategy
This strategy attempts to default x-sells to those matching the current products size.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CommerceCategoryServiceprotected Set<CategoryModel>getRootCategories(CategoryModel category) protected Stringprotected List<CategoryModel>getSuperCategoriesOfType(ProductModel productModel) getTarget(ProductModel sourceProduct, ProductReferenceModel reference) Gets the target product for the given product reference.protected VariantProductModelgetVariantWithSameSize(ProductReferenceModel reference, String size) protected booleanisCategoryType(CategoryModel category) voidsetCommerceCategoryService(CommerceCategoryService commerceCategoryService) voidsetRootCategoryCode(String rootCategoryCode)
-
Constructor Details
-
ApparelSizeProductReferenceTargetStrategy
public ApparelSizeProductReferenceTargetStrategy()
-
-
Method Details
-
getCommerceCategoryService
-
setCommerceCategoryService
-
getRootCategoryCode
-
setRootCategoryCode
-
getTarget
Description copied from interface:ProductReferenceTargetStrategyGets the target product for the given product reference. Should return either the a proposed target product or null if this strategy cannot offer a better target than the default.- Specified by:
getTargetin interfaceProductReferenceTargetStrategy- Parameters:
sourceProduct- the source productreference- the product reference- Returns:
- the target product
-
getVariantWithSameSize
-
getSuperCategoriesOfType
-
isCategoryType
-
getRootCategories
-