Class RecentViewedItemsService

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

public class RecentViewedItemsService extends Object
Manage 2 session RecentViewedItemsCollection for products and categories.
  • Field Details

    • VISITED_PRODUCT_KEY

      protected static final String VISITED_PRODUCT_KEY
      See Also:
    • VISITED_CATEGORY_KEY

      protected static final String VISITED_CATEGORY_KEY
      See Also:
    • maxRecentViewedItems

      protected int maxRecentViewedItems
    • sessionService

      protected de.hybris.platform.servicelayer.session.SessionService sessionService
  • Constructor Details

    • RecentViewedItemsService

      public RecentViewedItemsService()
  • Method Details

    • getRecentViewedCategories

      public List<String> getRecentViewedCategories()
    • getRecentViewedItemsCollection

      @Nonnull protected RecentViewedItemsCollection getRecentViewedItemsCollection(String key)
    • getRecentViewedProducts

      public List<String> getRecentViewedProducts()
    • productVisited

      public void productVisited(String productCode, String categoryCode)
      Register visited product and category.
      Parameters:
      productCode - Product code.
      categoryCode - Category code.
    • setMaxRecentViewedItems

      public void setMaxRecentViewedItems(int maxRecentViewedItems)
    • setSessionService

      public void setSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService)