Class OfferInteractionService
- java.lang.Object
-
- com.hybris.ymkt.recommendation.services.OfferInteractionService
-
public class OfferInteractionService extends java.lang.ObjectThis services is used to send offer interactions to SAP Marketing
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCOMMUNICATION_MEDIUMprotected static intMAX_FAILUREprotected ModelServicemodelServiceprotected ODataServiceoDataServiceprotected intreadBatchSizeprotected static intREADTIMEOUTprotected RecommendationBufferServicerecommendationBufferServiceprotected UserContextServiceuserContextService
-
Constructor Summary
Constructors Constructor Description OfferInteractionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,java.lang.Object>buildInteractionMap(SAPOfferInteractionModel model)Helper method that will bundle all the interactions for the property "Interactions" in the payload we send to ymktvoidsaveOfferInteraction(OfferInteractionContext offerInteractionContext)Saves the interaction in the database table with itemType SAPOfferInteractionprotected booleansendOfferInteraction(java.util.List<SAPOfferInteractionModel> interactionModels)voidsendOfferInteractions()Send all offer interaction records via OData service.voidsetModelService(ModelService modelService)voidsetODataService(ODataService oDataService)voidsetReadBatchSize(int readBatchSize)voidsetRecommendationBufferService(RecommendationBufferService recommendationBufferService)voidsetUserContextService(UserContextService userContextService)
-
-
-
Field Detail
-
COMMUNICATION_MEDIUM
protected static final java.lang.String COMMUNICATION_MEDIUM
- See Also:
- Constant Field Values
-
MAX_FAILURE
protected static final int MAX_FAILURE
- See Also:
- Constant Field Values
-
READTIMEOUT
protected static final int READTIMEOUT
- See Also:
- Constant Field Values
-
modelService
protected ModelService modelService
-
oDataService
protected ODataService oDataService
-
readBatchSize
protected int readBatchSize
-
recommendationBufferService
protected RecommendationBufferService recommendationBufferService
-
userContextService
protected UserContextService userContextService
-
-
Method Detail
-
buildInteractionMap
protected java.util.Map<java.lang.String,java.lang.Object> buildInteractionMap(SAPOfferInteractionModel model)
Helper method that will bundle all the interactions for the property "Interactions" in the payload we send to ymkt- Parameters:
model-- Returns:
- Interaction Map
-
saveOfferInteraction
public void saveOfferInteraction(OfferInteractionContext offerInteractionContext)
Saves the interaction in the database table with itemType SAPOfferInteraction- Parameters:
offerInteractionContext-OfferInteractionContext
-
sendOfferInteraction
protected boolean sendOfferInteraction(java.util.List<SAPOfferInteractionModel> interactionModels)
-
sendOfferInteractions
public void sendOfferInteractions()
Send all offer interaction records via OData service.
-
setModelService
public void setModelService(ModelService modelService)
-
setODataService
public void setODataService(ODataService oDataService)
-
setReadBatchSize
public void setReadBatchSize(int readBatchSize)
-
setRecommendationBufferService
public void setRecommendationBufferService(RecommendationBufferService recommendationBufferService)
-
setUserContextService
public void setUserContextService(UserContextService userContextService)
-
-