Class DefaultBrowseDetailsService
java.lang.Object
com.broadleafcommerce.catalog.service.commerce.DefaultBrowseDetailsService
- All Implemented Interfaces:
BrowseDetailsService
- Author:
- Nathan Moore (nathandmoore)
-
Constructor Summary
ConstructorDescriptionDefaultBrowseDetailsService
(ProductService<Product> productService, CategoryService<Category> categoryService, ProductDetailsService productDetailsService, CategoryDetailsService categoryDetailsService, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptiongetBrowseEntityDetails
(@NonNull BrowseDetailsRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) GetsBrowseEntityDetails
forBrowseDetailsRequests
protected Optional<CategoryDetails>
getCategoryDetails
(@NonNull BrowseDetailsRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Gets theCategoryDetails
after resolving it based on theBrowseDetailsRequest
.protected CategoryDetailsService
protected CategoryService<Category>
protected ProductDetailsList
getProductDetails
(@NonNull BrowseDetailsRequest request, @NonNull List<Product> products, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Gets theProductDetailsList
for the resolvedproducts
protected ProductDetailsService
protected ProductService<Product>
protected com.broadleafcommerce.common.extension.TypeFactory
-
Constructor Details
-
DefaultBrowseDetailsService
public DefaultBrowseDetailsService(ProductService<Product> productService, CategoryService<Category> categoryService, ProductDetailsService productDetailsService, CategoryDetailsService categoryDetailsService, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
getBrowseEntityDetails
public BrowseEntityDetails getBrowseEntityDetails(@NonNull @NonNull BrowseDetailsRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Description copied from interface:BrowseDetailsService
GetsBrowseEntityDetails
forBrowseDetailsRequests
- Specified by:
getBrowseEntityDetails
in interfaceBrowseDetailsService
- Parameters:
request
- theBrowseDetailsRequest
with additional request context for identifying the products for which to retrieve details and defining the how much detail to go into.context
- context information surrounding sandboxing/multitenant state- Returns:
BrowseEntityDetails
for therequest
.
-
getProductDetails
protected ProductDetailsList getProductDetails(@NonNull @NonNull BrowseDetailsRequest request, @NonNull @NonNull List<Product> products, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Gets theProductDetailsList
for the resolvedproducts
- Parameters:
request
- TheBrowseDetailsRequest
products
- The resolved products for aBrowseDetailsRequest
context
- Multitenant and sandbox context- Returns:
- The
ProductDetailsList
for therequest
.
-
getCategoryDetails
protected Optional<CategoryDetails> getCategoryDetails(@NonNull @NonNull BrowseDetailsRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Gets theCategoryDetails
after resolving it based on theBrowseDetailsRequest
.- Parameters:
request
- TheBrowseDetailsRequest
context
- Multitenant and sandbox context- Returns:
- The
CategoryDetails
for therequest
if any found.
-
getProductService
-
getCategoryService
-
getProductDetailsService
-
getCategoryDetailsService
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-