Class WarehousingStockLevelsController
java.lang.Object
de.hybris.platform.warehousingwebservices.controllers.WarehousingBaseController
de.hybris.platform.warehousingwebservices.controllers.stocklevel.WarehousingStockLevelsController
@Controller
@RequestMapping("/stocklevels")
public class WarehousingStockLevelsController
extends WarehousingBaseController
WebResource exposing
WarehousingStockLevelFacade
http://host:port/warehousingwebservices/stocklevels-
Field Summary
Fields inherited from class de.hybris.platform.warehousingwebservices.controllers.WarehousingBaseController
dataMapper, DEFAULT_CURRENT_PAGE, DEFAULT_FIELD_SET, DEFAULT_PAGE_SIZE, DEFAULT_SORT, WAREHOUSE_ADMINISTRATOR_GROUP, WAREHOUSE_AGENT_GROUP, WAREHOUSE_MANAGER_GROUP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateStockLevel(StockLevelWsDto stockLevelWsDto, String fields) Request to create aStockLevelModelin the systemcreateStockLevelAdjustment(String productCode, String warehouseCode, String binCode, String releaseDate, StockLevelAdjustmentsWsDTO stockLevelAdjustmentsWsDTO) Request to create aInventoryEventModelin the system to adjust a specificStockLevelModelRequest to get return stock level adjustment reasonsgetStockLevelsForWarehouseCode(String code, String fields, int currentPage, int pageSize, String sort) Request to get aStockLevelModelfor its "code"Methods inherited from class de.hybris.platform.warehousingwebservices.controllers.WarehousingBaseController
createPageable, validate
-
Constructor Details
-
WarehousingStockLevelsController
public WarehousingStockLevelsController()
-
-
Method Details
-
getStockLevelsForWarehouseCode
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/warehouses/{code}", method=GET) @ResponseBody public StockLevelSearchPageWsDto getStockLevelsForWarehouseCode(@PathVariable String code, @RequestParam(required=false,defaultValue="DEFAULT") String fields, @RequestParam(required=false,defaultValue="0") int currentPage, @RequestParam(required=false,defaultValue="10") int pageSize, @RequestParam(required=false,defaultValue="asc") String sort) Request to get aStockLevelModelfor its "code"- Parameters:
code- the code of the requestedWarehouseModelfields- defaulted to DEFAULT but can be FULL or BASICcurrentPage- number of the current pagepageSize- number of items in a pagesort- sorting the results ascending or descending- Returns:
- the list of stocklevels
-
createStockLevel
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(CREATED) @ResponseBody public StockLevelWsDto createStockLevel(@RequestBody StockLevelWsDto stockLevelWsDto, @RequestParam(required=false,defaultValue="DEFAULT") String fields) throws WebserviceValidationException Request to create aStockLevelModelin the system- Parameters:
fields- defaulted to DEFAULT but can be FULL or BASICstockLevelWsDto- object representingStockLevelWsDto- Returns:
- created stockLevel
- Throws:
WebserviceValidationException
-
getStockLevelAdjustmentReasons
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/adjustment-reasons", method=GET) @ResponseBody public StockLevelAdjustmentReasonsWsDTO getStockLevelAdjustmentReasons()Request to get return stock level adjustment reasons- Returns:
- list of stock level adjustment reason
-
createStockLevelAdjustment
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/product/{productCode}/warehouse/{warehouseCode}/adjustment", method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(CREATED) @ResponseBody public StockLevelAdjustmentsWsDTO createStockLevelAdjustment(@PathVariable String productCode, @PathVariable String warehouseCode, @RequestParam(required=false) String binCode, @RequestParam(required=false) String releaseDate, @RequestBody StockLevelAdjustmentsWsDTO stockLevelAdjustmentsWsDTO) throws WebserviceValidationException Request to create aInventoryEventModelin the system to adjust a specificStockLevelModel- Parameters:
productCode- the product code for which an adjustment is requiredwarehouseCode- the warehouse code for which an adjustment is requiredbinCode- the bin code of the stock level to adjust (optional)releaseDate- the release date of the stock level to adjust (optional)stockLevelAdjustmentsWsDTO- list of stock level adjustment to be created- Returns:
- created stockLevel
- Throws:
WebserviceValidationException
-