Class DefaultSkuToEntitlementLookupService

java.lang.Object
com.broadleafcommerce.billing.job.service.impl.DefaultSkuToEntitlementLookupService
All Implemented Interfaces:
SkuToEntitlementLookupService

public class DefaultSkuToEntitlementLookupService extends Object implements SkuToEntitlementLookupService
  • Field Details

    • skuToEntitlementsMap

      protected Map<String,Set<String>> skuToEntitlementsMap
    • catalogEntitlementProvider

      @Autowired protected CatalogEntitlementProvider catalogEntitlementProvider
    • properties

      @Autowired protected SkuToEntitlementLookupServiceProperties 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: SkuToEntitlementLookupService
      Gather the set of entitlements that assigned to a given sku
      Specified by:
      getEntitlementsBySku in interface SkuToEntitlementLookupService
      Parameters:
      skuId - The id of the relevant sku
      contextInfo - context information around the multi-tenant state
      Returns:
      the set of entitlements that assigned to a given sku
    • fetchMappingsFromAPI

      protected Map<String,Set<String>> fetchMappingsFromAPI(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • loadAndParseSkuToEntitlementJson

      protected Map<String,Set<String>> loadAndParseSkuToEntitlementJson()