public class RecommendationService
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected CartService |
cartService |
protected static java.lang.String |
GENERIC_RECOMMENDATION |
protected static EntityProviderReadProperties |
NO_READ_PROPERTIES |
protected ODataService |
oDataService |
protected static java.lang.String |
PERSONALIZED_RECOMMENDATION |
protected RecentViewedItemsService |
recentViewedItemsService |
protected static java.lang.String |
RECOMMENDATION_SCENARIOS |
protected RecommendationBufferService |
recommendationBufferService |
protected int |
requestTimeoutThreshold |
protected static java.lang.String |
RESTRICTED_RECOMMENDATION |
protected UserContextService |
userContextService |
| Constructor and Description |
|---|
RecommendationService() |
| Modifier and Type | Method and Description |
|---|---|
protected RecommendationScenario |
createRecommendationScenario(RecommendationContext context) |
java.util.List<java.lang.String> |
getCartItemsFromSession()
Returns product currently in the cart
|
protected SAPRecommendationBufferModel |
getFallbackRecommendationByType(java.lang.String userId,
java.lang.String scenarioId,
java.util.List<java.lang.String> leadingItems,
java.lang.String recommendationType) |
java.util.List<java.lang.String> |
getProductRecommendation(RecommendationContext context)
Read
ProductRecommendationDatas according to RecommendationContext. |
void |
setCartService(CartService cartService) |
void |
setODataService(ODataService oDataService) |
void |
setRecentViewedItemsService(RecentViewedItemsService recentViewedItemsService) |
void |
setRecommendationBufferService(RecommendationBufferService recommendationBufferService) |
void |
setRequestTimeoutThreshold(int requestTimeoutThreshold) |
void |
setUserContextService(UserContextService userContextService) |
protected static final EntityProviderReadProperties NO_READ_PROPERTIES
protected static final java.lang.String RECOMMENDATION_SCENARIOS
protected static final java.lang.String GENERIC_RECOMMENDATION
protected static final java.lang.String PERSONALIZED_RECOMMENDATION
protected static final java.lang.String RESTRICTED_RECOMMENDATION
protected CartService cartService
protected ODataService oDataService
protected RecentViewedItemsService recentViewedItemsService
protected RecommendationBufferService recommendationBufferService
protected UserContextService userContextService
protected int requestTimeoutThreshold
protected RecommendationScenario createRecommendationScenario(RecommendationContext context)
public java.util.List<java.lang.String> getCartItemsFromSession()
List of protected SAPRecommendationBufferModel getFallbackRecommendationByType(java.lang.String userId, java.lang.String scenarioId, java.util.List<java.lang.String> leadingItems, java.lang.String recommendationType)
public java.util.List<java.lang.String> getProductRecommendation(RecommendationContext context)
ProductRecommendationDatas according to RecommendationContext.context - Parameters of the recommendations to read.List of ProductRecommendationDatapublic void setCartService(CartService cartService)
public void setODataService(ODataService oDataService)
public void setRecentViewedItemsService(RecentViewedItemsService recentViewedItemsService)
public void setRecommendationBufferService(RecommendationBufferService recommendationBufferService)
public void setRequestTimeoutThreshold(int requestTimeoutThreshold)
public void setUserContextService(UserContextService userContextService)
Copyright © 2018 SAP SE. All Rights Reserved.