Class InteractionService
- java.lang.Object
-
- com.hybris.ymkt.recommendation.services.InteractionService
-
public class InteractionService extends java.lang.ObjectThis service is used for tracking, persisting and sending the successfully converted recommendation scenario.
These interactions are clickthrough.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringinteractionTypeprotected static intMAX_FAILUREprotected ModelServicemodelServiceprotected ODataServiceoDataServiceprotected intreadBatchSizeprotected RecommendationBufferServicerecommendationBufferServiceprotected UserContextServiceuserContextService
-
Constructor Summary
Constructors Constructor Description InteractionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanpostInteraction(SAPRecoClickthroughModel model)Send a single clickthrough entry via OData servicevoidsaveClickthrough(InteractionContext interactionContext)Save a clickthrough to databasevoidsendInteractions()Send all clickthrough records via OData servicevoidsetInteractionType(java.lang.String interactionType)voidsetModelService(ModelService modelService)voidsetODataService(ODataService oDataService)voidsetReadBatchSize(int readBatchSize)voidsetRecommendationBufferService(RecommendationBufferService recommendationBufferService)voidsetUserContextService(UserContextService userContextService)
-
-
-
Field Detail
-
MAX_FAILURE
protected static final int MAX_FAILURE
- See Also:
- Constant Field Values
-
interactionType
protected java.lang.String interactionType
-
modelService
protected ModelService modelService
-
oDataService
protected ODataService oDataService
-
readBatchSize
protected int readBatchSize
-
recommendationBufferService
protected RecommendationBufferService recommendationBufferService
-
userContextService
protected UserContextService userContextService
-
-
Method Detail
-
postInteraction
public boolean postInteraction(SAPRecoClickthroughModel model)
Send a single clickthrough entry via OData service- Parameters:
model-SAPRecoClickthroughModel- Returns:
- true if posting was a success, false otherwise.
-
saveClickthrough
public void saveClickthrough(InteractionContext interactionContext)
Save a clickthrough to database- Parameters:
interactionContext-InteractionContext
-
sendInteractions
public void sendInteractions()
Send all clickthrough records via OData service
-
setInteractionType
public void setInteractionType(java.lang.String interactionType)
-
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)
-
-