Class SAPRecommendationRetrieveController
java.lang.Object
com.hybris.ymkt.recommendationaddon.controllers.SAPRecommendationRetrieveController
@Controller("SAPRecommendationRetrieveController")
public class SAPRecommendationRetrieveController
extends Object
Controller for RecommendationList view
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected de.hybris.platform.acceleratorcms.component.slot.CMSPageSlotComponentServiceprotected InteractionServiceprotected ProductRecommendationManagerFacadeprotected RecommendationServiceprotected javax.servlet.http.HttpServletRequestprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Optional<CMSSAPRecommendationComponentModel>getComponent(String componentId) voidregisterClickthrough(String id, String componentId) Create a click-through interaction when a recommended product is clickedvoidregisterProdRecoImpression(int itemCount, String componentId) Creates an impression row in the table with the component's item count and ScenarioIdretrieveRecommendations(String id, String productCode, String componentId, org.springframework.ui.Model model) Retrieve the recommended products to be rendered in the UI
-
Field Details
-
VIEWNAME
- See Also:
-
cmsPageSlotComponentService
protected de.hybris.platform.acceleratorcms.component.slot.CMSPageSlotComponentService cmsPageSlotComponentService -
interactionService
-
recommendationService
-
productRecommendationManagerFacade
-
request
@Autowired protected javax.servlet.http.HttpServletRequest request
-
-
Constructor Details
-
SAPRecommendationRetrieveController
public SAPRecommendationRetrieveController()
-
-
Method Details
-
getComponent
-
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
-