Class BasicUserTargetFilterService
java.lang.Object
com.broadleafcommerce.pricing.service.BasicUserTargetFilterService
- All Implemented Interfaces:
UserTargetFilterService
@ConfigurationProperties(prefix="broadleaf.pricing.usertarget")
public class BasicUserTargetFilterService
extends Object
implements UserTargetFilterService
Implementations of this service provide support for reducing the user targets that are involved
in pricing with the goal of increasing the caching of
PriceList
related queries.- Author:
- Brian Polster (bpolster)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
filterUserTargets
(Set<UserTarget> targets, com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Filters the passed in set ofUserTarget
to include only those relevant for pricing.void
setFilterInfo
(UserTargetFilterInfo filterInfo) protected boolean
shouldRemove
(Map<String, List<String>> targetValuesMap, UserTarget target)
-
Constructor Details
-
BasicUserTargetFilterService
public BasicUserTargetFilterService()
-
-
Method Details
-
filterUserTargets
public void filterUserTargets(Set<UserTarget> targets, com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:UserTargetFilterService
Filters the passed in set ofUserTarget
to include only those relevant for pricing. Most implementations can benefit from cachingPriceList
queries needed by thePriceInfoService
- Specified by:
filterUserTargets
in interfaceUserTargetFilterService
- Parameters:
targets
- Set of targets to filter.- See Also:
-
shouldRemove
-
getFilterInfo
-
setFilterInfo
-