Class WarehousingPointOfServicesController

    • Constructor Detail

      • WarehousingPointOfServicesController

        public WarehousingPointOfServicesController()
    • 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 service
        fields - 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 given PointOfServiceModel in the system
        Parameters:
        pointOfServiceName - the name of the PointOfServiceData
        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:
        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 WebserviceValidationException
        Request to update a PointOfServiceModel in the system Make sure to pass a valid WarehouseCode to update the Point Of Service with
        Parameters:
        pointOfServiceName - The name of the PointOfServiceModel
        fields - defaulted to DEFAULT but can be FULL or BASIC
        warehouseCodes - 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 WebserviceValidationException
        Request to delete warehouses from PointOfServiceModel.
        Parameters:
        pointOfServiceName - The name of the PointOfServiceModel
        fields - defaulted to DEFAULT but can be FULL or BASIC
        warehouseCode - 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 WebserviceValidationException
        Request to update a PointOfServiceModel in 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 BASIC
        pointOfServiceName - The name of the PointOfServiceModel that we are trying to update
        address - 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)