Class PriceListEndpoint
java.lang.Object
com.broadleafcommerce.pricing.web.endpoint.PriceListEndpoint
@FrameworkRestController
@FrameworkMapping(path="/price-lists")
@DataRouteByExample(PriceList.class)
public class PriceListEndpoint
extends Object
-
Field Summary
Modifier and TypeFieldDescriptionprotected final PriceDataService<PriceData>
protected final PricingCurrencyHelper
-
Constructor Summary
ConstructorDescriptionPriceListEndpoint
(PriceListService<PriceList> service, PriceDataService<PriceData> priceDataService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, PricingCurrencyHelper pricingCurrencyHelper) -
Method Summary
Modifier and TypeMethodDescriptioncreatePriceData
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String priceListId, PriceData priceData) createPriceList
(jakarta.servlet.http.HttpServletRequest request, String type, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, PriceList priceList) void
deletePriceData
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String priceListId, String priceDataId) void
deletePriceList
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id) void
deletePriceListWithType
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id) org.springframework.http.ResponseEntity<ModifiableFields>
org.springframework.data.domain.Page<PriceList>
readAllContractPriceLists
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String name, org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters) org.springframework.data.domain.Page<PriceData>
readAllPriceDataForPriceList
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, org.springframework.data.domain.Pageable page, String priceListId) Deprecated, for removal: This API element is subject to removal in a future version.org.springframework.data.domain.Page<PriceData>
readAllPriceDataForPriceList
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, org.springframework.data.domain.Pageable page, String priceListId, cz.jirutka.rsql.parser.ast.Node filters) org.springframework.data.domain.Page<PriceData>
readAllPriceDatasByTargetTypeAndId
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, org.springframework.data.domain.Pageable page, String targetType, List<String> targetIds, String priceListId) Deprecated, for removal: This API element is subject to removal in a future version.org.springframework.data.domain.Page<PriceData>
readAllPriceDatasByTargetTypeAndId
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, org.springframework.data.domain.Pageable page, String targetType, List<String> targetIds, String priceListId, cz.jirutka.rsql.parser.ast.Node filters) org.springframework.data.domain.Page<PriceList>
readAllPriceLists
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String name, org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters) org.springframework.data.domain.Page<PriceList>
readAllSalePriceLists
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String name, org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters) org.springframework.data.domain.Page<PriceList>
readAllStandardPriceLists
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String name, org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters) readPriceData
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String priceListId, String priceDataId) readPriceListById
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String priceListId) readPriceListByTypeAndId
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String priceListId) replacePriceData
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String priceListId, String priceDataId, PriceData priceData) replacePriceList
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, PriceList priceList) replacePriceListWithType
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, PriceList priceList) resolvePriceList
(String priceListId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) org.springframework.data.domain.Page<com.broadleafcommerce.pricing.client.domain.PriceListRef>
retrievePriceListsByContext
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContextHeader, com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContextBody) updatePriceData
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String priceListId, String priceDataId, PriceData priceData) updatePriceList
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, PriceList priceList) updatePriceListWithType
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, PriceList priceList)
-
Field Details
-
priceDataService
-
pricingCurrencyHelper
-
-
Constructor Details
-
PriceListEndpoint
public PriceListEndpoint(PriceListService<PriceList> service, PriceDataService<PriceData> priceDataService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, PricingCurrencyHelper pricingCurrencyHelper)
-
-
Method Details
-
readAllPriceLists
@FrameworkGetMapping @Policy(permissionRoots="PRICE_LIST") public org.springframework.data.domain.Page<PriceList> readAllPriceLists(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestParam(value="q",required=false) String name, @PageableDefault(size=50) org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters) -
readAllStandardPriceLists
@FrameworkGetMapping("/standard") @Policy(permissionRoots="PRICE_LIST") public org.springframework.data.domain.Page<PriceList> readAllStandardPriceLists(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestParam(value="q",required=false) String name, @PageableDefault(size=50) org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters) -
readAllContractPriceLists
@FrameworkGetMapping("/contract") @Policy(permissionRoots="PRICE_LIST") public org.springframework.data.domain.Page<PriceList> readAllContractPriceLists(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestParam(value="q",required=false) String name, @PageableDefault(size=50) org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters) -
readAllSalePriceLists
@FrameworkGetMapping("/sale") @Policy(permissionRoots="PRICE_LIST") public org.springframework.data.domain.Page<PriceList> readAllSalePriceLists(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestParam(value="q",required=false) String name, @PageableDefault(size=50) org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters) -
readPriceListByTypeAndId
-
readPriceListById
-
updatePriceListWithType
@FrameworkPatchMapping(value="/{type}/{id}", consumes="application/json") @Policy(permissionRoots="PRICE_LIST") public PriceList updatePriceListWithType(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id, @RequestBody PriceList priceList) -
updatePriceList
@FrameworkPatchMapping(value="/{id}", consumes="application/json") @Policy(permissionRoots="PRICE_LIST") public PriceList updatePriceList(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id, @RequestBody PriceList priceList) -
replacePriceListWithType
@FrameworkPutMapping(value="/{type}/{id}", consumes="application/json") @Policy(permissionRoots="PRICE_LIST") public PriceList replacePriceListWithType(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id, @RequestBody PriceList priceList) -
replacePriceList
@FrameworkPutMapping(value="/{id}", consumes="application/json") @Policy(permissionRoots="PRICE_LIST") public PriceList replacePriceList(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id, @RequestBody PriceList priceList) -
createPriceList
@FrameworkPostMapping(value="/{type}", consumes="application/json") @Policy(permissionRoots="PRICE_LIST") public PriceList createPriceList(jakarta.servlet.http.HttpServletRequest request, @PathVariable("type") String type, @ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody PriceList priceList) -
deletePriceListWithType
@FrameworkDeleteMapping("/{type}/{id}") @Policy(permissionRoots="PRICE_LIST") public void deletePriceListWithType(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id) -
deletePriceList
@FrameworkDeleteMapping("{id}") @Policy(permissionRoots="PRICE_LIST") public void deletePriceList(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id) -
retrievePriceListsByContext
@FrameworkPostMapping @Policy(permissionRoots="PRICE_LIST") public org.springframework.data.domain.Page<com.broadleafcommerce.pricing.client.domain.PriceListRef> retrievePriceListsByContext(jakarta.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 priceContextHeader, @RequestBody(required=false) com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContextBody) -
getModifiableFieldsForType
@FrameworkGetMapping(path="/modifiable-fields") public org.springframework.http.ResponseEntity<ModifiableFields> getModifiableFieldsForType(@RequestParam("type") String type) -
readAllPriceDataForPriceList
@Deprecated(since="1.7.2", forRemoval=true) public org.springframework.data.domain.Page<PriceData> readAllPriceDataForPriceList(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PageableDefault(size=50) org.springframework.data.domain.Pageable page, @PathVariable("priceListId") String priceListId) Deprecated, for removal: This API element is subject to removal in a future version.UsereadAllPriceDataForPriceList(HttpServletRequest, ContextInfo, Pageable, String, Node)
. PriceData needs the ability to filter for the frontend, the old endpoints did not take in filter parameters. -
readAllPriceDataForPriceList
@FrameworkGetMapping("/{priceListId}/price-data") @Policy(permissionRoots="PRICE_LIST") public org.springframework.data.domain.Page<PriceData> readAllPriceDataForPriceList(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PageableDefault(size=50) org.springframework.data.domain.Pageable page, @PathVariable("priceListId") String priceListId, cz.jirutka.rsql.parser.ast.Node filters) -
readAllPriceDatasByTargetTypeAndId
@Deprecated(since="1.7.2", forRemoval=true) public org.springframework.data.domain.Page<PriceData> readAllPriceDatasByTargetTypeAndId(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PageableDefault(size=50) org.springframework.data.domain.Pageable page, @RequestParam(name="targetType",required=false) String targetType, @RequestParam(name="targetId",required=false) List<String> targetIds, @PathVariable("priceListId") String priceListId) Deprecated, for removal: This API element is subject to removal in a future version.UsereadAllPriceDataForPriceList(HttpServletRequest, ContextInfo, Pageable, String, Node)
. PriceData needs the ability to filter for the frontend, the old endpoints did not take in filter parameters. -
readAllPriceDatasByTargetTypeAndId
@FrameworkGetMapping("/{type}/{priceListId}/price-data") @Policy(permissionRoots="PRICE_LIST") public org.springframework.data.domain.Page<PriceData> readAllPriceDatasByTargetTypeAndId(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PageableDefault(size=50) org.springframework.data.domain.Pageable page, @RequestParam(name="targetType",required=false) String targetType, @RequestParam(name="targetId",required=false) List<String> targetIds, @PathVariable("priceListId") String priceListId, cz.jirutka.rsql.parser.ast.Node filters) -
readPriceData
@FrameworkGetMapping("/{type}/{priceListId}/price-data/{dataId}") @Policy(permissionRoots="PRICE_LIST") public PriceData readPriceData(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("priceListId") String priceListId, @PathVariable("dataId") String priceDataId) -
updatePriceData
@FrameworkPatchMapping("/{type}/{priceListId}/price-data/{dataId}") @Policy(permissionRoots="PRICE_LIST") public PriceData updatePriceData(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("priceListId") String priceListId, @PathVariable("dataId") String priceDataId, @RequestBody PriceData priceData) -
replacePriceData
@FrameworkPutMapping("/{type}/{priceListId}/price-data/{dataId}") @Policy(permissionRoots="PRICE_LIST") public PriceData replacePriceData(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("priceListId") String priceListId, @PathVariable("dataId") String priceDataId, @RequestBody PriceData priceData) -
createPriceData
@FrameworkPostMapping("/{type}/{priceListId}/price-data") @Policy(permissionRoots="PRICE_LIST") public PriceData createPriceData(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("priceListId") String priceListId, @RequestBody PriceData priceData) -
deletePriceData
@FrameworkDeleteMapping("/{type}/{id}/price-data/{dataId}") @Policy(permissionRoots="PRICE_LIST") public void deletePriceData(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String priceListId, @PathVariable("dataId") String priceDataId) -
resolvePriceList
-
readAllPriceDataForPriceList(HttpServletRequest, ContextInfo, Pageable, String, Node)
.