Class DefaultMarketplaceDiscoverer

java.lang.Object
com.broadleafcommerce.tenant.service.messaging.vendor.DefaultMarketplaceDiscoverer
All Implemented Interfaces:
MarketplaceDiscoverer

public class DefaultMarketplaceDiscoverer extends Object implements MarketplaceDiscoverer
Default implementation of MarketplaceDiscoverer. This implementation will choose the first active application it finds where Application.isMarketplace() is true in the database.

To ensure deterministic behavior, if more than one marketplace application is found, it will return empty.

  • Constructor Details

    • DefaultMarketplaceDiscoverer

      public DefaultMarketplaceDiscoverer(com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> filterParser, ApplicationService<? extends Application> applicationService)
  • Method Details

    • findMarketplacesForVendor

      public List<String> findMarketplacesForVendor(String vendorRef, String tenant)
      Description copied from interface: MarketplaceDiscoverer
      Find one or more marketplace application ids (Application.getId()) that a newly created catalog for a newly created vendor should be assigned to.
      Specified by:
      findMarketplacesForVendor in interface MarketplaceDiscoverer
      Parameters:
      vendorRef - The unique vendor reference of the newly created vendor
      tenant - The tenant to which the applications must belong
      Returns:
      The application ids to associate the vendor's new catalog to. Can be empty, but must never be null.