Class CategoryDetailsEndpoint
java.lang.Object
com.broadleafcommerce.catalog.web.endpoint.commerce.CategoryDetailsEndpoint
@FrameworkRestController
@FrameworkMapping("/category-details")
@DataRouteByExample(CategoryDetails.class)
public class CategoryDetailsEndpoint
extends Object
- Author:
- Nathan Moore (nathandmoore)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected CategoryDetailsService
org.springframework.http.ResponseEntity<CategoryDetails>
readDetailsForRequest
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, org.springframework.data.domain.Pageable productPageInfo, CategoryDetailsRequest categoryDetailsRequest, org.springframework.util.MultiValueMap<String, String> parameters) Returns aCategoryDetails
for the givenCategoryDetailsRequest
.
-
Constructor Details
-
CategoryDetailsEndpoint
-
-
Method Details
-
readDetailsForRequest
@FrameworkGetMapping public org.springframework.http.ResponseEntity<CategoryDetails> readDetailsForRequest(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PageableDefault org.springframework.data.domain.Pageable productPageInfo, CategoryDetailsRequest categoryDetailsRequest, @RequestParam org.springframework.util.MultiValueMap<String, String> parameters) Returns aCategoryDetails
for the givenCategoryDetailsRequest
. If the request is missing or has insufficient information (e.g., is missingCategoryDetailsRequest.getCategoryId()
andCategoryDetailsRequest.getCategoryUrl()
), the this returns a 400 error. If no category matches the request, then this returns a 404.- Parameters:
request
-HttpServletRequest
for the requestcontext
- Context info for multitenant and sandbox conditionsproductPageInfo
-pagination info
to apply toproducts included in the response
.categoryDetailsRequest
- TheCategoryDetailsRequest
- Returns:
- a
CategoryDetails
matching theCategoryDetailsRequest
.
-
getCategoryDetailsService
-