Class DefaultSparkRecommendationService
java.lang.Object
com.broadleafcommerce.recommendationengine.service.DefaultSparkRecommendationService
- All Implemented Interfaces:
RecommendationService
,Serializable
public class DefaultSparkRecommendationService
extends Object
implements RecommendationService, Serializable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultSparkRecommendationService
(CustomerService<Customer> customerService, CatalogItemService<CatalogItem> catalogItemService, UserRecommendationService<UserRecommendation> userRecommendationService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, RecommendationEngineProperties recommendationEngineProperties) -
Method Summary
Modifier and TypeMethodDescriptiondetermineRecommendations
(RecommendationRequest recommendationRequest, com.broadleafcommerce.recommendationengine.domain.context.CustomerContext customerContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) protected String
extractUserIdFromCustomerContext
(com.broadleafcommerce.recommendationengine.domain.context.CustomerContext customerContext) Can target email or id as user ID.protected CatalogItemService<CatalogItem>
protected CustomerService<Customer>
protected RecommendationEngineProperties
protected com.broadleafcommerce.common.extension.TypeFactory
protected UserRecommendationService<UserRecommendation>
-
Constructor Details
-
DefaultSparkRecommendationService
public DefaultSparkRecommendationService(CustomerService<Customer> customerService, CatalogItemService<CatalogItem> catalogItemService, UserRecommendationService<UserRecommendation> userRecommendationService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, RecommendationEngineProperties recommendationEngineProperties)
-
-
Method Details
-
determineRecommendations
public UserRecommendation determineRecommendations(RecommendationRequest recommendationRequest, com.broadleafcommerce.recommendationengine.domain.context.CustomerContext customerContext, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
determineRecommendations
in interfaceRecommendationService
-
extractUserIdFromCustomerContext
protected String extractUserIdFromCustomerContext(com.broadleafcommerce.recommendationengine.domain.context.CustomerContext customerContext) Can target email or id as user ID. See RecommendationEngineProperties- Parameters:
customerContext
-- Returns:
-
getCustomerService
-
getCatalogItemService
-
getUserRecommendationService
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getRecommendationEngineProperties
-