Class SkuInventoryEndpoint
- java.lang.Object
-
- com.broadleafcommerce.inventory.web.endpoint.SkuInventoryEndpoint
-
@FrameworkRestController @FrameworkMapping("/sku-inventory") @DataRouteByKey("inventory") public class SkuInventoryEndpoint extends Object
REST Endpoint to allow for the creation, selection, and read ofSkuInventory
data, especially given anInventoryLocation
.- Author:
- Kelly Tisdell (ktisdell)
-
-
Field Summary
Fields Modifier and Type Field Description static String
SKU_INVENTORY_URI
-
Constructor Summary
Constructors Constructor Description SkuInventoryEndpoint(SkuInventoryService<SkuInventory> skuInventoryService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, SkuInventorySummaryService<SkuInventoryAvailabilitySummary> skuInventorySummaryService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SkuInventory
createSkuInventoryRecord(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, SkuInventory skuInventoryRecord)
void
delete(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id)
protected SkuInventoryService<SkuInventory>
getSkuInventoryService()
protected SkuInventorySummaryService<SkuInventoryAvailabilitySummary>
getSkuInventorySummaryService()
protected com.broadleafcommerce.common.extension.TypeFactory
getTypeFactory()
org.springframework.data.domain.Page<SkuInventory>
readAllSkuInventory(String nameQuery, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
ConsolidatedInventoryResponse
readConsolidatedAvailability(javax.servlet.http.HttpServletRequest request, Set<String> skuCodes, int minimumQuantity, Boolean forShipping, Boolean forPickup, Boolean inStore, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
SkuInventory
readSkuInventoryByContextId(javax.servlet.http.HttpServletRequest request, String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
SkuInventory
updateSkuInventoryRecord(javax.servlet.http.HttpServletRequest request, String skuInventoryId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, SkuInventory skuInventoryRecord)
-
-
-
Field Detail
-
SKU_INVENTORY_URI
public static final String SKU_INVENTORY_URI
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SkuInventoryEndpoint
public SkuInventoryEndpoint(SkuInventoryService<SkuInventory> skuInventoryService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, SkuInventorySummaryService<SkuInventoryAvailabilitySummary> skuInventorySummaryService)
-
-
Method Detail
-
readAllSkuInventory
@FrameworkGetMapping @Policy(permissionRoots="INVENTORY") public org.springframework.data.domain.Page<SkuInventory> readAllSkuInventory(@RequestParam(value="q",required=false) String nameQuery, cz.jirutka.rsql.parser.ast.Node filters, @PageableDefault(size=50) org.springframework.data.domain.Pageable page, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
readSkuInventoryByContextId
@FrameworkGetMapping("/{id}") @Policy(permissionRoots="INVENTORY") public SkuInventory readSkuInventoryByContextId(javax.servlet.http.HttpServletRequest request, @PathVariable("id") String id, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
delete
@FrameworkDeleteMapping("/{id}") @Policy(permissionRoots="INVENTORY") public void delete(javax.servlet.http.HttpServletRequest request, @ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id)
-
createSkuInventoryRecord
@FrameworkPostMapping @Policy(permissionRoots="INVENTORY") public SkuInventory createSkuInventoryRecord(javax.servlet.http.HttpServletRequest request, @ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody SkuInventory skuInventoryRecord)
-
updateSkuInventoryRecord
@FrameworkPutMapping("/{id}") @Policy(permissionRoots="INVENTORY") public SkuInventory updateSkuInventoryRecord(javax.servlet.http.HttpServletRequest request, @PathVariable("id") String skuInventoryId, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody SkuInventory skuInventoryRecord)
-
readConsolidatedAvailability
@FrameworkGetMapping("/availability-summary") @Policy(permissionRoots="CONSOLIDATED_INVENTORY_AVAILABILITY") public ConsolidatedInventoryResponse readConsolidatedAvailability(javax.servlet.http.HttpServletRequest request, @RequestParam("skuCodes") Set<String> skuCodes, @RequestParam(value="minimumQuantity",defaultValue="1") int minimumQuantity, @RequestParam(name="forShipping",defaultValue="true") Boolean forShipping, @RequestParam(name="forPickup",defaultValue="true") Boolean forPickup, @RequestParam(required=false,name="inStore") Boolean inStore, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
getSkuInventoryService
@NonNull protected SkuInventoryService<SkuInventory> getSkuInventoryService()
-
getTypeFactory
@NonNull protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-
getSkuInventorySummaryService
@NonNull protected SkuInventorySummaryService<SkuInventoryAvailabilitySummary> getSkuInventorySummaryService()
-
-