Class RecommendationService

java.lang.Object
com.hybris.ymkt.recommendation.services.RecommendationService

public class RecommendationService extends Object
This service perform the 'get recommendation' actions, such as reading all scenario hashes of a user or read the recommendation for a given scenario and context.
  • Field Details

    • NO_READ_PROPERTIES

      protected static final org.apache.olingo.odata2.api.ep.EntityProviderReadProperties NO_READ_PROPERTIES
    • RECOMMENDATION_SCENARIOS

      protected static final String RECOMMENDATION_SCENARIOS
      See Also:
    • GENERIC_RECOMMENDATION

      protected static final String GENERIC_RECOMMENDATION
      See Also:
    • PERSONALIZED_RECOMMENDATION

      protected static final String PERSONALIZED_RECOMMENDATION
      See Also:
    • RESTRICTED_RECOMMENDATION

      protected static final String RESTRICTED_RECOMMENDATION
      See Also:
    • cartService

      protected de.hybris.platform.order.CartService cartService
    • oDataService

      protected ODataService oDataService
    • recentViewedItemsService

      protected RecentViewedItemsService recentViewedItemsService
    • recommendationBufferService

      protected RecommendationBufferService recommendationBufferService
    • userContextService

      protected UserContextService userContextService
    • requestTimeoutThreshold

      protected int requestTimeoutThreshold
  • Constructor Details

    • RecommendationService

      public RecommendationService()
  • Method Details

    • createRecommendationScenario

      protected RecommendationScenario createRecommendationScenario(RecommendationContext context)
    • getCartItemsFromSession

      public List<String> getCartItemsFromSession()
      Returns product currently in the cart
      Returns:
      List of
    • getFallbackRecommendationByType

      protected SAPRecommendationBufferModel getFallbackRecommendationByType(String userId, String scenarioId, List<String> leadingItems, String recommendationType)
    • getProductRecommendation

      public List<String> getProductRecommendation(RecommendationContext context)
      Read ProductRecommendationDatas according to RecommendationContext.
      Parameters:
      context - Parameters of the recommendations to read.
      Returns:
      List of ProductRecommendationData
    • setCartService

      public void setCartService(de.hybris.platform.order.CartService cartService)
    • setODataService

      public void setODataService(ODataService oDataService)
    • setRecentViewedItemsService

      public void setRecentViewedItemsService(RecentViewedItemsService recentViewedItemsService)
    • setRecommendationBufferService

      public void setRecommendationBufferService(RecommendationBufferService recommendationBufferService)
    • setRequestTimeoutThreshold

      public void setRequestTimeoutThreshold(int requestTimeoutThreshold)
    • setUserContextService

      public void setUserContextService(UserContextService userContextService)