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
Fields Modifier and Type Field Description protected PriceDataService<PriceData>
priceDataService
protected PricingCurrencyHelper
pricingCurrencyHelper
-
Constructor Summary
Constructors Constructor Description PriceListEndpoint(PriceListService<PriceList> service, PriceDataService<PriceData> priceDataService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, PricingCurrencyHelper pricingCurrencyHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PriceData
createPriceData(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String priceListId, PriceData priceData)
PriceList
createPriceList(javax.servlet.http.HttpServletRequest request, String type, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, PriceList priceList)
void
deletePriceData(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String priceListId, String priceDataId)
void
deletePriceList(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id)
void
deletePriceListWithType(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id)
org.springframework.http.ResponseEntity<ModifiableFields>
getModifiableFieldsForType(String type)
org.springframework.data.domain.Page<PriceList>
readAllContractPriceLists(javax.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(javax.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(javax.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(javax.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(javax.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(javax.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(javax.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(javax.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)
PriceData
readPriceData(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String priceListId, String priceDataId)
PriceList
readPriceListById(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String priceListId)
PriceList
readPriceListByTypeAndId(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String priceListId)
PriceData
replacePriceData(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String priceListId, String priceDataId, PriceData priceData)
PriceList
replacePriceList(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, PriceList priceList)
PriceList
replacePriceListWithType(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, PriceList 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(javax.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)
PriceData
updatePriceData(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String priceListId, String priceDataId, PriceData priceData)
PriceList
updatePriceList(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, PriceList priceList)
PriceList
updatePriceListWithType(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, PriceList priceList)
-
-
-
Field Detail
-
priceDataService
protected final PriceDataService<PriceData> priceDataService
-
pricingCurrencyHelper
protected final PricingCurrencyHelper pricingCurrencyHelper
-
-
Constructor Detail
-
PriceListEndpoint
public PriceListEndpoint(PriceListService<PriceList> service, PriceDataService<PriceData> priceDataService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, PricingCurrencyHelper pricingCurrencyHelper)
-
-
Method Detail
-
readAllPriceLists
@FrameworkGetMapping @Policy(permissionRoots="PRICE_LIST") public org.springframework.data.domain.Page<PriceList> readAllPriceLists(javax.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(javax.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(javax.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(javax.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
@FrameworkGetMapping("/{type}/{id}") @Policy(permissionRoots="PRICE_LIST") public PriceList readPriceListByTypeAndId(javax.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String priceListId)
-
readPriceListById
@FrameworkGetMapping("/{id}") @Policy(permissionRoots="PRICE_LIST") public PriceList readPriceListById(javax.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String priceListId)
-
updatePriceListWithType
@FrameworkPatchMapping(value="/{type}/{id}", consumes="application/json") @Policy(permissionRoots="PRICE_LIST") public PriceList updatePriceListWithType(javax.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(javax.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(javax.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(javax.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(javax.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(javax.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(javax.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(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 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(javax.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(javax.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(javax.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(javax.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(javax.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(javax.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(javax.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(javax.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(javax.servlet.http.HttpServletRequest request, @ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String priceListId, @PathVariable("dataId") String priceDataId)
-
-