Class JpaTenantCatalogVendorVisibilityHandler

java.lang.Object
com.broadleafcommerce.tenant.service.marketplace.vendor.provider.jpa.JpaTenantCatalogVendorVisibilityHandler
All Implemented Interfaces:
com.broadleafcommerce.common.extension.data.DataRoutePartitionAware, com.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler, org.springframework.core.Ordered

public class JpaTenantCatalogVendorVisibilityHandler extends Object implements com.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler
Responsible for performing vendor-visibility operations directly on JpaTenantCatalog. Note that this is different from CatalogDiscriminatedEntityVendorVisibilityHandler, which is used for vendor discrimination on catalog-discriminated entities.

Catalogs are associated to vendors through JpaTenantCatalog.getVendorRef(), and this handler uses the value of that field to determine whether a catalog is within a particular vendor or not.

  • Constructor Details

    • JpaTenantCatalogVendorVisibilityHandler

      public JpaTenantCatalogVendorVisibilityHandler()
  • Method Details

    • canHandle

      public boolean canHandle(Class<?> persistedDomainEntityType)
      Specified by:
      canHandle in interface com.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
      Specified by:
      getOrder in interface com.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler
    • getDataRoutePartition

      public String getDataRoutePartition()
      Specified by:
      getDataRoutePartition in interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
    • isEntityMutableByVendorRestrictions

      public boolean isEntityMutableByVendorRestrictions(Object persistedDomainEntity, Set<String> restrictedVendorRefs, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Specified by:
      isEntityMutableByVendorRestrictions in interface com.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler
    • createVendorNarrowingFilter

      public String createVendorNarrowingFilter(Set<String> restrictedVendorRefs, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Specified by:
      createVendorNarrowingFilter in interface com.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler
    • getAssociatedVendorRef

      @Nullable public String getAssociatedVendorRef(Object persistedDomainEntity, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Specified by:
      getAssociatedVendorRef in interface com.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler