Class SAPOfferRecommendationRetrieveController
- java.lang.Object
-
- com.hybris.ymkt.recommendationaddon.controllers.SAPOfferRecommendationRetrieveController
-
@Controller("SAPOfferRecommendationRetrieveController") public class SAPOfferRecommendationRetrieveController extends java.lang.ObjectController for offerrecommendationList view
-
-
Field Summary
Fields Modifier and Type Field Description protected CMSPageSlotComponentServicecmsPageSlotComponentServiceprotected static java.lang.StringOFFER_CLICKprotected static java.lang.StringOFFER_DISPLAYprotected OfferRecommendationManagerFacadeofferRecommendationManagerFacadeprotected javax.servlet.http.HttpServletRequestrequestprotected static java.lang.StringVIEWNAME
-
Constructor Summary
Constructors Constructor Description SAPOfferRecommendationRetrieveController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Optional<CMSSAPOfferRecoComponentModel>getComponent(java.lang.String componentId)voidregisterOfferClick(java.lang.String componentId, java.lang.String offerId, java.lang.String offerContentId)voidregisterOfferDisplay(java.lang.String componentId, java.lang.String offerId, java.lang.String offerContentId)java.lang.StringretrieveOfferRecommendations(java.lang.String id, java.lang.String componentId, org.springframework.ui.Model model)Retrieve the recommended offers to be rendered in the UIvoidsaveOfferInteraction(java.lang.String componentId, java.lang.String offerId, java.lang.String offerContentId, boolean bIsOfferDisplay)
-
-
-
Field Detail
-
OFFER_CLICK
protected static final java.lang.String OFFER_CLICK
- See Also:
- Constant Field Values
-
OFFER_DISPLAY
protected static final java.lang.String OFFER_DISPLAY
- See Also:
- Constant Field Values
-
VIEWNAME
protected static final java.lang.String VIEWNAME
- See Also:
- Constant Field Values
-
cmsPageSlotComponentService
protected CMSPageSlotComponentService cmsPageSlotComponentService
-
offerRecommendationManagerFacade
protected OfferRecommendationManagerFacade offerRecommendationManagerFacade
-
request
@Autowired protected javax.servlet.http.HttpServletRequest request
-
-
Method Detail
-
getComponent
protected java.util.Optional<CMSSAPOfferRecoComponentModel> getComponent(java.lang.String componentId)
-
registerOfferClick
@RequestMapping(value="/action/offerClick/", method=POST) @ResponseBody public void registerOfferClick(@RequestParam("componentId") java.lang.String componentId, @RequestParam("offerid") java.lang.String offerId, @RequestParam("offerContentId") java.lang.String offerContentId)
-
registerOfferDisplay
@RequestMapping(value="/action/offerDisplay/", method=POST) @ResponseBody public void registerOfferDisplay(@RequestParam("componentId") java.lang.String componentId, @RequestParam("offerid") java.lang.String offerId, @RequestParam("offerContentId") java.lang.String offerContentId)
-
retrieveOfferRecommendations
@RequestMapping("/action/offers/") public java.lang.String retrieveOfferRecommendations(@RequestParam("id") java.lang.String id, @RequestParam("componentId") java.lang.String componentId, org.springframework.ui.Model model)Retrieve the recommended offers to be rendered in the UI- Parameters:
id-componentId-model-- Returns:
- viewName
-
saveOfferInteraction
public void saveOfferInteraction(java.lang.String componentId, java.lang.String offerId, java.lang.String offerContentId, boolean bIsOfferDisplay)- Parameters:
componentId-offerId-offerContentId-bIsOfferDisplay-
-
-