Class SAPRecommendationRetrieveController
- java.lang.Object
-
- com.hybris.ymkt.recommendationaddon.controllers.SAPRecommendationRetrieveController
-
@Controller("SAPRecommendationRetrieveController") public class SAPRecommendationRetrieveController extends java.lang.ObjectController for RecommendationList view
-
-
Field Summary
Fields Modifier and Type Field Description protected CMSPageSlotComponentServicecmsPageSlotComponentServiceprotected InteractionServiceinteractionServiceprotected ProductRecommendationManagerFacadeproductRecommendationManagerFacadeprotected RecommendationServicerecommendationServiceprotected javax.servlet.http.HttpServletRequestrequestprotected static java.lang.StringVIEWNAME
-
Constructor Summary
Constructors Constructor Description SAPRecommendationRetrieveController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Optional<CMSSAPRecommendationComponentModel>getComponent(java.lang.String componentId)voidregisterClickthrough(java.lang.String id, java.lang.String componentId)Create a click-through interaction when a recommended product is clickedvoidregisterProdRecoImpression(int itemCount, java.lang.String componentId)Creates an impression row in the table with the component's item count and ScenarioIdjava.lang.StringretrieveRecommendations(java.lang.String id, java.lang.String productCode, java.lang.String componentId, org.springframework.ui.Model model)Retrieve the recommended products to be rendered in the UI
-
-
-
Field Detail
-
VIEWNAME
protected static final java.lang.String VIEWNAME
- See Also:
- Constant Field Values
-
cmsPageSlotComponentService
protected CMSPageSlotComponentService cmsPageSlotComponentService
-
interactionService
protected InteractionService interactionService
-
recommendationService
protected RecommendationService recommendationService
-
productRecommendationManagerFacade
protected ProductRecommendationManagerFacade productRecommendationManagerFacade
-
request
@Autowired protected javax.servlet.http.HttpServletRequest request
-
-
Method Detail
-
getComponent
protected java.util.Optional<CMSSAPRecommendationComponentModel> getComponent(java.lang.String componentId)
-
registerClickthrough
@RequestMapping(value="/action/prodRecoInteraction/", method=POST) @ResponseBody public void registerClickthrough(@RequestParam("id") java.lang.String id, @RequestParam("componentId") java.lang.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") java.lang.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 java.lang.String retrieveRecommendations(@RequestParam("id") java.lang.String id, @RequestParam("productCode") java.lang.String productCode, @RequestParam("componentId") java.lang.String componentId, org.springframework.ui.Model model)Retrieve the recommended products to be rendered in the UI- Parameters:
id-productCode-model-- Returns:
- viewName
-
-