Class PriceInfosEndpoint
- java.lang.Object
-
- com.broadleafcommerce.pricing.web.endpoint.PriceInfosEndpoint
-
@FrameworkRestController @FrameworkMapping("/price-infos") @DataRouteByExample(com.broadleafcommerce.pricing.client.domain.PriceInfo.class) public class PriceInfosEndpoint extends Object
- Author:
- Chad Harchar (charchar)
-
-
Constructor Summary
Constructors Constructor Description PriceInfosEndpoint(PriceInfoService service, PricingCurrencyHelper pricingCurrencyHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PricingCurrencyHelper
getPricingCurrencyHelper()
protected PriceInfoService
getService()
boolean
priceByProvidedPriceLists(com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext)
org.springframework.data.domain.Page<com.broadleafcommerce.pricing.client.domain.PriceInfo>
retrievePriceInfos(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext)
Used to retrieve a page ofPriceInfos
for the given context andpriceable targets
.
-
-
-
Constructor Detail
-
PriceInfosEndpoint
public PriceInfosEndpoint(PriceInfoService service, PricingCurrencyHelper pricingCurrencyHelper)
-
-
Method Detail
-
retrievePriceInfos
@FrameworkPostMapping @Policy(permissionRoots="PRICE_LIST") public org.springframework.data.domain.Page<com.broadleafcommerce.pricing.client.domain.PriceInfo> retrievePriceInfos(javax.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestHeader(value="X-Price-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @RequestBody com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext)
Used to retrieve a page ofPriceInfos
for the given context andpriceable targets
.- Parameters:
request
- TheHttpServletRequest
made to the servercontext
- context information around sandbox and multitenant statepriceContext
- context information used to filter price lists to determine which are applicable to the request if none are provided inpriceInfoContext
.priceInfoContext
- Additional context information including a preselected group of price lists and the items for which to find pricing info.- Returns:
- A page of
PriceInfos
for the given context andpriceable targets
.
-
priceByProvidedPriceLists
public boolean priceByProvidedPriceLists(@RequestBody com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext)
-
getService
@NonNull protected PriceInfoService getService()
-
getPricingCurrencyHelper
@NonNull protected PricingCurrencyHelper getPricingCurrencyHelper()
-
-