Class WarehousingPointOfServicesController
- java.lang.Object
-
- de.hybris.platform.warehousingwebservices.controllers.WarehousingBaseController
-
- de.hybris.platform.warehousingwebservices.controllers.pointofservice.WarehousingPointOfServicesController
-
@Controller @RequestMapping("/pointofservices") public class WarehousingPointOfServicesController extends WarehousingBaseControllerWebResource exposingWarehousingPointOfServiceFacadehttp://host:port/warehousingwebservices/pointofservices
-
-
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 Constructor Description WarehousingPointOfServicesController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PointOfServiceWsDTOdeleteWarehousesFromPointOfService(@NotNull java.lang.String pointOfServiceName, @NotNull java.lang.String warehouseCode, java.lang.String fields)Request to delete warehouses fromPointOfServiceModel.protected org.springframework.validation.ValidatorgetAddressDTOValidator()PointOfServiceWsDTOgetPointOfServiceByName(java.lang.String name, java.lang.String fields)Request to get a point of service by nameWarehouseSearchPageWsDtogetWarehousesForPointOfService(java.lang.String pointOfServiceName, java.lang.String fields, int currentPage, int pageSize, java.lang.String sort)Request to get all warehouses for the givenPointOfServiceModelin the systemprotected voidsetAddressDTOValidator(org.springframework.validation.Validator addressDTOValidator)PointOfServiceWsDTOupdatePointOfServiceWithAddress(AddressWsDTO address, @NotNull java.lang.String pointOfServiceName, java.lang.String fields)Request to update aPointOfServiceModelin the system Make sure to pass a valid WarehouseCode to update the Point Of Service withPointOfServiceWsDTOupdatePointOfServiceWithWarehouses(WarehouseCodesWsDto warehouseCodes, @NotNull java.lang.String pointOfServiceName, java.lang.String fields)Request to update aPointOfServiceModelin the system Make sure to pass a valid WarehouseCode to update the Point Of Service with-
Methods inherited from class de.hybris.platform.warehousingwebservices.controllers.WarehousingBaseController
createPageable, validate
-
-
-
-
Method Detail
-
getPointOfServiceByName
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{name}", method=GET) @ResponseBody public PointOfServiceWsDTO getPointOfServiceByName(@PathVariable java.lang.String name, @RequestParam(required=false,defaultValue="DEFAULT") java.lang.String fields)Request to get a point of service by name- Parameters:
name- the name of the requested point of servicefields- defaulted to DEFAULT but can be FULL or BASIC- Returns:
- the point of service
-
getWarehousesForPointOfService
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{pointOfServiceName}/warehouses", method=GET) @ResponseBody public WarehouseSearchPageWsDto getWarehousesForPointOfService(@PathVariable java.lang.String pointOfServiceName, @RequestParam(required=false,defaultValue="DEFAULT") java.lang.String fields, @RequestParam(required=false,defaultValue="0") int currentPage, @RequestParam(required=false,defaultValue="10") int pageSize, @RequestParam(required=false,defaultValue="asc") java.lang.String sort)Request to get all warehouses for the givenPointOfServiceModelin the system- Parameters:
pointOfServiceName- the name of thePointOfServiceDatafields- 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:
- list of warehouses
-
updatePointOfServiceWithWarehouses
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{pointOfServiceName}/warehouses", method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(OK) @ResponseBody public PointOfServiceWsDTO updatePointOfServiceWithWarehouses(@RequestBody WarehouseCodesWsDto warehouseCodes, @NotNull @PathVariable @NotNull java.lang.String pointOfServiceName, @RequestParam(required=false,defaultValue="DEFAULT") java.lang.String fields) throws WebserviceValidationExceptionRequest to update aPointOfServiceModelin the system Make sure to pass a valid WarehouseCode to update the Point Of Service with- Parameters:
pointOfServiceName- The name of thePointOfServiceModelfields- defaulted to DEFAULT but can be FULL or BASICwarehouseCodes- contains a list of warehouse codes which will be removed from the current point of service- Returns:
- updated pointOfService
- Throws:
WebserviceValidationException
-
deleteWarehousesFromPointOfService
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{pointOfServiceName}/warehouses/{warehouseCode}", method=DELETE, produces={"application/json","application/xml"}) @ResponseStatus(NO_CONTENT) @ResponseBody public PointOfServiceWsDTO deleteWarehousesFromPointOfService(@NotNull @PathVariable @NotNull java.lang.String pointOfServiceName, @NotNull @PathVariable @NotNull java.lang.String warehouseCode, @RequestParam(required=false,defaultValue="DEFAULT") java.lang.String fields) throws WebserviceValidationExceptionRequest to delete warehouses fromPointOfServiceModel.- Parameters:
pointOfServiceName- The name of thePointOfServiceModelfields- defaulted to DEFAULT but can be FULL or BASICwarehouseCode- the warehouse code which will be removed from the current point of service- Returns:
- updated Point of Service
- Throws:
WebserviceValidationException
-
updatePointOfServiceWithAddress
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{pointOfServiceName}/address", method=PUT, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(OK) @ResponseBody public PointOfServiceWsDTO updatePointOfServiceWithAddress(@RequestBody AddressWsDTO address, @NotNull @PathVariable @NotNull java.lang.String pointOfServiceName, @RequestParam(required=false,defaultValue="DEFAULT") java.lang.String fields) throws WebserviceValidationExceptionRequest to update aPointOfServiceModelin the system Make sure to pass a valid WarehouseCode to update the Point Of Service with- Parameters:
fields- defaulted to DEFAULT but can be FULL or BASICpointOfServiceName- The name of thePointOfServiceModelthat we are trying to updateaddress- the address to update the POS with- Returns:
- updated pointOfService
- Throws:
WebserviceValidationException
-
getAddressDTOValidator
protected org.springframework.validation.Validator getAddressDTOValidator()
-
setAddressDTOValidator
protected void setAddressDTOValidator(org.springframework.validation.Validator addressDTOValidator)
-
-