Class DefaultMarketplaceDiscoverer
java.lang.Object
com.broadleafcommerce.tenant.service.messaging.vendor.DefaultMarketplaceDiscoverer
- All Implemented Interfaces:
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 Summary
ConstructorDescriptionDefaultMarketplaceDiscoverer
(com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> filterParser, ApplicationService<? extends Application> applicationService) -
Method Summary
Modifier and TypeMethodDescriptionfindMarketplacesForVendor
(String vendorRef, String tenant) Find one or more marketplace application ids (Application.getId()
) that a newly created catalog for a newly created vendor should be assigned to.
-
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
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 interfaceMarketplaceDiscoverer
- Parameters:
vendorRef
- The unique vendor reference of the newly created vendortenant
- 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.
-