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
  • 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 a StockLevelModel for its "code"
      Parameters:
      code - the code of the requested WarehouseModel
      fields - defaulted to DEFAULT but can be FULL or BASIC
      currentPage - number of the current page
      pageSize - number of items in a page
      sort - 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 a StockLevelModel in the system
      Parameters:
      fields - defaulted to DEFAULT but can be FULL or BASIC
      stockLevelWsDto - object representing StockLevelWsDto
      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 a InventoryEventModel in the system to adjust a specific StockLevelModel
      Parameters:
      productCode - the product code for which an adjustment is required
      warehouseCode - the warehouse code for which an adjustment is required
      binCode - 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