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 WarehousingBaseController
WebResource exposing
WarehousingPointOfServiceFacade
http://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 -
Method Summary
Modifier and TypeMethodDescriptiondeleteWarehousesFromPointOfService(@NotNull String pointOfServiceName, @NotNull String warehouseCode, String fields) Request to delete warehouses fromPointOfServiceModel.protected org.springframework.validation.ValidatorgetPointOfServiceByName(String name, String fields) Request to get a point of service by namegetWarehousesForPointOfService(String pointOfServiceName, String fields, int currentPage, int pageSize, String sort) Request to get all warehouses for the givenPointOfServiceModelin the systemprotected voidsetAddressDTOValidator(org.springframework.validation.Validator addressDTOValidator) updatePointOfServiceWithAddress(AddressWsDTO address, @NotNull String pointOfServiceName, String fields) Request to update aPointOfServiceModelin the system Make sure to pass a valid WarehouseCode to update the Point Of Service withupdatePointOfServiceWithWarehouses(WarehouseCodesWsDto warehouseCodes, @NotNull String pointOfServiceName, String fields) Request to update aPointOfServiceModelin the system Make sure to pass a valid WarehouseCode to update the Point Of Service withMethods inherited from class de.hybris.platform.warehousingwebservices.controllers.WarehousingBaseController
createPageable, validate
-
Constructor Details
-
WarehousingPointOfServicesController
public WarehousingPointOfServicesController()
-
-
Method Details
-
getPointOfServiceByName
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{name}", method=GET) @ResponseBody public PointOfServiceWsDTO getPointOfServiceByName(@PathVariable String name, @RequestParam(required=false,defaultValue="DEFAULT") 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 String pointOfServiceName, @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 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 String pointOfServiceName, @RequestParam(required=false,defaultValue="DEFAULT") String fields) throws WebserviceValidationException Request 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 String pointOfServiceName, @NotNull @PathVariable @NotNull String warehouseCode, @RequestParam(required=false,defaultValue="DEFAULT") String fields) throws WebserviceValidationException Request 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 String pointOfServiceName, @RequestParam(required=false,defaultValue="DEFAULT") String fields) throws WebserviceValidationException Request 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)
-