Class SAPRecommendationRetrieveController

java.lang.Object
com.hybris.ymkt.recommendationaddon.controllers.SAPRecommendationRetrieveController

@Controller("SAPRecommendationRetrieveController") public class SAPRecommendationRetrieveController extends Object
Controller for RecommendationList view
  • Field Details

    • VIEWNAME

      protected static final String VIEWNAME
      See Also:
    • cmsPageSlotComponentService

      protected de.hybris.platform.acceleratorcms.component.slot.CMSPageSlotComponentService cmsPageSlotComponentService
    • interactionService

      protected InteractionService interactionService
    • recommendationService

      protected RecommendationService recommendationService
    • productRecommendationManagerFacade

      protected ProductRecommendationManagerFacade productRecommendationManagerFacade
    • request

      @Autowired protected javax.servlet.http.HttpServletRequest request
  • Constructor Details

    • SAPRecommendationRetrieveController

      public SAPRecommendationRetrieveController()
  • Method Details

    • getComponent

      protected Optional<CMSSAPRecommendationComponentModel> getComponent(String componentId)
    • registerClickthrough

      @RequestMapping(value="/action/prodRecoInteraction/", method=POST) @ResponseBody public void registerClickthrough(@RequestParam("id") String id, @RequestParam("componentId") String componentId)
      Create a click-through interaction when a recommended product is clicked
      Parameters:
      id -
      componentId -
    • registerProdRecoImpression

      @RequestMapping(value="/action/prodRecoImpression/", method=POST) @ResponseBody public void registerProdRecoImpression(@RequestParam("itemCount") int itemCount, @RequestParam("componentId") String componentId)
      Creates an impression row in the table with the component's item count and ScenarioId
      Parameters:
      itemCount -
      componentId -
    • retrieveRecommendations

      @RequestMapping("/action/recommendations/") public String retrieveRecommendations(@RequestParam("id") String id, @RequestParam("productCode") String productCode, @RequestParam("componentId") String componentId, org.springframework.ui.Model model)
      Retrieve the recommended products to be rendered in the UI
      Parameters:
      id -
      productCode -
      model -
      Returns:
      viewName