Class DefaultSkuToEntitlementLookupService
java.lang.Object
com.broadleafcommerce.billing.job.service.impl.DefaultSkuToEntitlementLookupService
- All Implemented Interfaces:
SkuToEntitlementLookupService
public class DefaultSkuToEntitlementLookupService
extends Object
implements SkuToEntitlementLookupService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CatalogEntitlementProviderprotected com.fasterxml.jackson.databind.ObjectMapperprotected SkuToEntitlementLookupServicePropertiesprotected org.springframework.core.io.ResourceLoader -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfetchMappingsFromAPI(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) getEntitlementsBySku(String skuId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gather the set of entitlements that assigned to a given skuvoidinit()
-
Field Details
-
skuToEntitlementsMap
-
catalogEntitlementProvider
-
properties
-
resourceLoader
@Autowired protected org.springframework.core.io.ResourceLoader resourceLoader -
objectMapper
@Autowired protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
DefaultSkuToEntitlementLookupService
public DefaultSkuToEntitlementLookupService()
-
-
Method Details
-
init
@PostConstruct public void init() -
getEntitlementsBySku
public Set<String> getEntitlementsBySku(String skuId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:SkuToEntitlementLookupServiceGather the set of entitlements that assigned to a given sku- Specified by:
getEntitlementsBySkuin interfaceSkuToEntitlementLookupService- Parameters:
skuId- The id of the relevant skucontextInfo- context information around the multi-tenant state- Returns:
- the set of entitlements that assigned to a given sku
-
fetchMappingsFromAPI
-
loadAndParseSkuToEntitlementJson
-