Class JpaVendorEntityVendorVisibilityHandler

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

public class JpaVendorEntityVendorVisibilityHandler extends Object implements com.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler
Responsible for performing vendor-visibility operations on JpaVendors themselves, so only permitted vendors are visible.
  • Constructor Details

    • JpaVendorEntityVendorVisibilityHandler

      public JpaVendorEntityVendorVisibilityHandler(int order, String dataRoutePartition)
  • Method Details

    • canHandle

      public boolean canHandle(@NonNull @NonNull Class<?> persistedDomainEntityType)
      Specified by:
      canHandle in interface com.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler
    • 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
    • getOrder

      public int getOrder()
      Defines the priority of this vendor visibility handler in comparison to others injected by VendorVisibilityManager.
      Specified by:
      getOrder in interface org.springframework.core.Ordered
      Specified by:
      getOrder in interface com.broadleafcommerce.data.tracking.core.marketplace.vendor.visibility.VendorVisibilityHandler
      See Also:
    • getDataRoutePartition

      public String getDataRoutePartition()
      Defines the data route in which this vendor visibility handler should apply.
      Specified by:
      getDataRoutePartition in interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAware