Class DefaultRecommendationValidator
java.lang.Object
com.broadleafcommerce.recommendationengine.service.validation.DefaultRecommendationValidator
- All Implemented Interfaces:
RecommendationValidator
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultRecommendationValidator
(RecommendationTrackableBehaviorUtil recommendationTrackableBehaviorUtil) -
Method Summary
Modifier and TypeMethodDescriptionvoid
validate
(RecommendationRequest recommendationRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Check whether or not the recommendation request in this context is valid.protected void
validateApplicationContext
(RecommendationRequest recommendationRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
Constructor Details
-
DefaultRecommendationValidator
public DefaultRecommendationValidator(RecommendationTrackableBehaviorUtil recommendationTrackableBehaviorUtil)
-
-
Method Details
-
validate
public void validate(RecommendationRequest recommendationRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) throws InvalidRecommendationException Description copied from interface:RecommendationValidator
Check whether or not the recommendation request in this context is valid.- Specified by:
validate
in interfaceRecommendationValidator
- Parameters:
recommendationRequest
- The recommendations to fetchcontext
- The context information surrounding sandboxing/multitenant state- Throws:
InvalidRecommendationException
- if the recommendation request is not valid
-
validateApplicationContext
protected void validateApplicationContext(RecommendationRequest recommendationRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) throws InvalidRecommendationException - Throws:
InvalidRecommendationException
-
getRecommendationTrackableBehaviorUtil
-