public class LeavesOrClosestAncestorsCatalogLookupStrategy extends java.lang.Object implements CxCatalogLookupStrategy
CxCatalogLookupStrategy that looks first in the leaves catalogs and go up 1 level until it
finds a catalog with personalization.| Constructor and Description |
|---|
LeavesOrClosestAncestorsCatalogLookupStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected CatalogVersionService |
getCatalogVersionService() |
java.util.List<CatalogVersionModel> |
getCatalogVersionsForCalculation() |
protected java.util.List<CatalogVersionModel> |
getCatalogVersionsFromLeafCatalogs(java.util.Collection<CatalogVersionModel> allCatalogsVersions,
java.util.Set<CatalogModel> leafCatalogs) |
protected CxCatalogService |
getCxCatalogService() |
protected java.util.Set<CatalogModel> |
getLeafCatalogs(java.util.Collection<CatalogModel> sessionCatalogs) |
protected int |
getMaxRecursions() |
protected java.util.List<CatalogVersionModel> |
getPersonalizationCvsFromLeaves(java.util.Collection<CatalogModel> sessionCatalogs,
int recursionLevel) |
protected java.util.List<CatalogModel> |
getSessionCatalogs() |
CxCatalogLookupType |
getType() |
protected boolean |
isLeafCatalog(CatalogModel catalog,
java.util.Collection<CatalogModel> sessionCatalogs)
In this context, a "leaf" catalog is a catalog that doesn't have any child present in the session.
|
void |
setCatalogVersionService(CatalogVersionService catalogVersionService) |
void |
setCxCatalogService(CxCatalogService cxCatalogService) |
void |
setMaxRecursions(int maxRecursions) |
public LeavesOrClosestAncestorsCatalogLookupStrategy()
public CxCatalogLookupType getType()
getType in interface CxCatalogLookupStrategypublic java.util.List<CatalogVersionModel> getCatalogVersionsForCalculation()
getCatalogVersionsForCalculation in interface CxCatalogLookupStrategyprotected java.util.List<CatalogModel> getSessionCatalogs()
protected java.util.List<CatalogVersionModel> getPersonalizationCvsFromLeaves(java.util.Collection<CatalogModel> sessionCatalogs, int recursionLevel)
protected java.util.Set<CatalogModel> getLeafCatalogs(java.util.Collection<CatalogModel> sessionCatalogs)
protected java.util.List<CatalogVersionModel> getCatalogVersionsFromLeafCatalogs(java.util.Collection<CatalogVersionModel> allCatalogsVersions, java.util.Set<CatalogModel> leafCatalogs)
protected boolean isLeafCatalog(CatalogModel catalog, java.util.Collection<CatalogModel> sessionCatalogs)
catalog - catalog version to check for childrensessionCatalogs - the current catalogs in the sessionprotected CatalogVersionService getCatalogVersionService()
public void setCxCatalogService(CxCatalogService cxCatalogService)
protected CxCatalogService getCxCatalogService()
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
protected int getMaxRecursions()
public void setMaxRecursions(int maxRecursions)
Copyright © 2018 SAP SE. All Rights Reserved.