Class WarehousingConsignmentsController
java.lang.Object
de.hybris.platform.warehousingwebservices.controllers.WarehousingBaseController
de.hybris.platform.warehousingwebservices.controllers.order.WarehousingConsignmentsController
@Controller
@RequestMapping("/consignments")
public class WarehousingConsignmentsController
extends WarehousingBaseController
WebResource exposing
WarehousingConsignmentFacade
http://host:port/warehousingwebservices/consignments-
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 TypeMethodDescriptionvoidRequest to confirmConsignmentModel's pickupvoidconfirmShipConsignment(String code) Request to confirmConsignmentModel's shippingconsolidatedPickConsignments(ConsignmentCodesWsDTO consignmentCodes) Request to pick, if applicable, eachConsignmentModelfor the provided list of consignment codes and generate a consolidated pick slip.protected Set<ConsignmentStatus>extractConsignmentStatuses(String statuses) Extract the set ofConsignmentStatusfrom the requestgetConsignmentEntriesForConsignmentCode(String code, String fields, int currentPage, int pageSize, String sort) Request to get allConsignmentEntryModelfor the given "code"getConsignmentForCode(String code, String fields) Request to getConsignmentModelfor the given codeprotected org.springframework.validation.ValidatorgetConsignments(String fields, int currentPage, int pageSize, String sort) Request to get allConsignmentModelin the systemgetConsignmentsByStatus(String consignmentStatuses, String fields, int currentPage, int pageSize, String sort) Request to get allConsignmentModelwith certain consignment status(es)Request to get allConsignmentStatusin the systemRequest to get allDeclineReasonavailable in the system.getExportForm(@NotNull String code) Request to get the export form of aConsignmentModelgetPackagingInfo(@NotNull String code) Request to getPackagingInfoWsDTOfor the givenConsignmentModel.CODEprotected org.springframework.validation.ValidatorgetReturnForm(@NotNull String code) Request to get the return form of aConsignmentModelgetReturnShippingLabel(@NotNull String code) Request to get the return shipping label of a ConsignmentgetShippingLabel(@NotNull String code) Request to get the shipping label of aConsignmentModelgetSourcingLocationsForConsignmentCode(String code, String fields, int currentPage, int pageSize, String sort) Request to get all sourcing locations for the given "code"Request to check ifConsignmentModelcan be confirmedvoidmanuallyReleasePaymentCapture(@NotNull String code) Request to manually releaseConsignmentModelfrom the waiting step after the payment capture has failedvoidmanuallyReleaseTaxCommit(@NotNull String code) Request to manully releaseConsignmentModelfrom the waiting step after a tax commit failurepackConsignment(@NotNull String code, boolean printSlip) Request to pack aConsignmentModeland optionally generate its Pack LabelpickConsignment(@NotNull String code, boolean printSlip) Request to pick aConsignmentModeland generate its Pick SlipvoidreallocateConsignment(ConsignmentReallocationWsDTO consignmentReallocationWsDTO, @NotNull String code) Request to reallocate aConsignmentModelto a new warehouse.voidsetConsignmentReallocationDTOValidator(org.springframework.validation.Validator consignmentReallocationValidator) voidsetPackagingInfoDTOValidator(org.springframework.validation.Validator packagingInfoDTOValidator) takePayment(@NotNull String code, String fields) Request to take a payment for aConsignmentModelupdatePackagingInfo(PackagingInfoWsDTO packagingInfo, @NotNull String code, String fields) Request to update aConsignmentModelwith a new Packaging information.Methods inherited from class de.hybris.platform.warehousingwebservices.controllers.WarehousingBaseController
createPageable, validate
-
Constructor Details
-
WarehousingConsignmentsController
public WarehousingConsignmentsController()
-
-
Method Details
-
getConsignments
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(method=GET) @ResponseBody public ConsignmentSearchPageWsDto getConsignments(@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 allConsignmentModelin the system- Parameters:
fields- 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
ConsignmentModel
-
getConsignmentForCode
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}", method=GET) @ResponseBody public ConsignmentWsDTO getConsignmentForCode(@PathVariable String code, @RequestParam(required=false,defaultValue="DEFAULT") String fields) Request to getConsignmentModelfor the given code- Parameters:
fields- defaulted to DEFAULT but can be FULL or BASICcode- code to get the required consignment- Returns:
ConsignmentModeldetails for the given code
-
getSourcingLocationsForConsignmentCode
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/sourcing-locations", method=GET) @ResponseBody public WarehouseSearchPageWsDto getSourcingLocationsForConsignmentCode(@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 all sourcing locations for the given "code"- Parameters:
code-ConsignmentModel.CODEfor the requested sourcing locationfields- 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 locations compliant to the above conditions
-
getConsignmentsByStatus
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="status/{consignmentStatuses}", method=GET) @ResponseBody public ConsignmentSearchPageWsDto getConsignmentsByStatus(@PathVariable String consignmentStatuses, @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) throws WebserviceValidationException Request to get allConsignmentModelwith certain consignment status(es)- Parameters:
consignmentStatuses- a list of validConsignmentStatusseparated by ","fields- 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
ConsignmentModelthat complies with conditions above - Throws:
WebserviceValidationException- in case of passing a wrongConsignmentStatus
-
getConsignmentStatuses
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/statuses", method=GET) @ResponseBody public ConsignmentStatusListWsDTO getConsignmentStatuses()Request to get allConsignmentStatusin the system- Returns:
- list of
ConsignmentStatus
-
getDeclineReasons
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/decline-reasons", method=GET) @ResponseBody public DeclineReasonListWsDTO getDeclineReasons()Request to get allDeclineReasonavailable in the system.- Returns:
- list of
DeclineReason
-
getConsignmentEntriesForConsignmentCode
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/entries", method=GET) @ResponseBody public ConsignmentEntrySearchPageWsDto getConsignmentEntriesForConsignmentCode(@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 allConsignmentEntryModelfor the given "code"- Parameters:
code- "code" for the requested consignment entriesfields- 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
ConsignmentEntryModelfulfilling the above conditions
-
confirmShipConsignment
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="{code}/confirm-shipping", method=POST, consumes={"application/xml","application/json"}, produces={"application/json","application/xml"}) @ResponseStatus(OK) public void confirmShipConsignment(@PathVariable String code) Request to confirmConsignmentModel's shipping- Parameters:
code- consignment's code for the requested consignment
-
confirmPickupConsignment
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="{code}/confirm-pickup", method=POST, consumes={"application/xml","application/json"}, produces={"application/json","application/xml"}) @ResponseStatus(OK) public void confirmPickupConsignment(@PathVariable String code) Request to confirmConsignmentModel's pickup- Parameters:
code-ConsignmentModel.CODEfor the requested consignment
-
isConsignmentConfirmable
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="{code}/is-confirmable", method=GET) @ResponseBody public Boolean isConsignmentConfirmable(@PathVariable String code) Request to check ifConsignmentModelcan be confirmed- Parameters:
code-ConsignmentModel.CODEfor the requested consignment
-
getPackagingInfo
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/packaging-info", method=GET) @ResponseBody public PackagingInfoWsDTO getPackagingInfo(@PathVariable @NotNull @NotNull String code) Request to getPackagingInfoWsDTOfor the givenConsignmentModel.CODE- Parameters:
code- code of the consignment for which to get the packaging information- Returns:
- the packaging information of the
ConsignmentModel
-
updatePackagingInfo
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/packaging-info", method=PUT, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(OK) @ResponseBody public ConsignmentWsDTO updatePackagingInfo(@RequestBody PackagingInfoWsDTO packagingInfo, @PathVariable @NotNull @NotNull String code, @RequestParam(required=false,defaultValue="DEFAULT") String fields) Request to update aConsignmentModelwith a new Packaging information.- Parameters:
packagingInfo- thePackagingInfoWsDTOto update the consignment withcode-ConsignmentModel.CODEfor which to update the packaging informationfields- defaulted to DEFAULT but can be FULL or BASIC- Returns:
- updated
ConsignmentWsDTO
-
reallocateConsignment
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/reallocate", method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(OK) @ResponseBody public void reallocateConsignment(@RequestBody ConsignmentReallocationWsDTO consignmentReallocationWsDTO, @PathVariable @NotNull @NotNull String code) Request to reallocate aConsignmentModelto a new warehouse.- Parameters:
consignmentReallocationWsDTO- the dto containing entries to be reallocatedcode-ConsignmentModel.CODEto be reallocated
-
pickConsignment
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/pick", method=POST, produces="*/*") @ResponseStatus(OK) @ResponseBody public String pickConsignment(@PathVariable @NotNull @NotNull String code, @RequestParam(required=false,defaultValue="true") boolean printSlip) Request to pick aConsignmentModeland generate its Pick Slip- Parameters:
code-ConsignmentModel.CODEfor the requested consignmentprintSlip- Flag for backwards compatibility. Used to check if the pick slip will be generated- Returns:
- the optionally generated html Pick Slip template
-
consolidatedPickConsignments
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/consolidated-pick", method=POST, produces="*/*", consumes={"application/json","application/xml"}) @ResponseStatus(OK) @ResponseBody public String consolidatedPickConsignments(@RequestBody ConsignmentCodesWsDTO consignmentCodes) Request to pick, if applicable, eachConsignmentModelfor the provided list of consignment codes and generate a consolidated pick slip.- Parameters:
consignmentCodes- a list of consignment codes- Returns:
- the generated html Consolidated Pick Slip template
-
packConsignment
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/pack", method=POST, produces="*/*") @ResponseStatus(OK) @ResponseBody public String packConsignment(@PathVariable @NotNull @NotNull String code, @RequestParam(required=false,defaultValue="true") boolean printSlip) Request to pack aConsignmentModeland optionally generate its Pack Label- Parameters:
code-ConsignmentModel.CODEfor the request consignmentprintSlip- Flag for backwards compatibility. Used to check if the pack label will be generated- Returns:
- the optionally generated html Pack Label template
-
getExportForm
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/export-form", method=GET, produces="*/*") @ResponseBody public String getExportForm(@PathVariable @NotNull @NotNull String code) Request to get the export form of aConsignmentModel- Parameters:
code-ConsignmentModel.CODEfor the request consignment- Returns:
- the generated html Export Form template
-
getShippingLabel
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/shipping-label", method=GET, produces="*/*") @ResponseBody public String getShippingLabel(@PathVariable @NotNull @NotNull String code) Request to get the shipping label of aConsignmentModel- Parameters:
code-ConsignmentModel.CODEfor the request consignment- Returns:
- the generated html Shipping Label template
-
getReturnShippingLabel
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/return-shipping-label", method=GET, produces="*/*") @ResponseBody public String getReturnShippingLabel(@PathVariable @NotNull @NotNull String code) Request to get the return shipping label of a Consignment- Parameters:
code- consignment's code for the request consignment- Returns:
- the generated html Return Shipping Label template
-
getReturnForm
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/return-form", method=GET, produces="*/*") @ResponseBody public String getReturnForm(@PathVariable @NotNull @NotNull String code) Request to get the return form of aConsignmentModel- Parameters:
code-ConsignmentModel.CODEfor the request consignment- Returns:
- the generated html Return Form template
-
takePayment
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/take-payment", method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(OK) @ResponseBody public PaymentTransactionEntryWsDTO takePayment(@PathVariable @NotNull @NotNull String code, @RequestParam(required=false,defaultValue="DEFAULT") String fields) Request to take a payment for aConsignmentModel- Parameters:
code-ConsignmentModel.CODEfor the request consignment- Returns:
- the
PaymentTransactionEntryWsDTO
-
manuallyReleasePaymentCapture
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/manual/capture-payment", method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(OK) public void manuallyReleasePaymentCapture(@PathVariable @NotNull @NotNull String code) Request to manually releaseConsignmentModelfrom the waiting step after the payment capture has failed- Parameters:
code-ConsignmentModel.CODEfor the request consignment
-
manuallyReleaseTaxCommit
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/manual/commit-tax", method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(OK) public void manuallyReleaseTaxCommit(@PathVariable @NotNull @NotNull String code) Request to manully releaseConsignmentModelfrom the waiting step after a tax commit failure- Parameters:
code-ConsignmentModel.CODEfor the requested consignment
-
extractConsignmentStatuses
Extract the set ofConsignmentStatusfrom the request- Parameters:
statuses- "," separatedConsignmentStatus- Returns:
- set of
ConsignmentStatus - Throws:
WebserviceValidationException- in case of passing a wrongConsignmentStatus
-
getPackagingInfoDTOValidator
protected org.springframework.validation.Validator getPackagingInfoDTOValidator() -
setPackagingInfoDTOValidator
public void setPackagingInfoDTOValidator(org.springframework.validation.Validator packagingInfoDTOValidator) -
getConsignmentReallocationValidator
protected org.springframework.validation.Validator getConsignmentReallocationValidator() -
setConsignmentReallocationDTOValidator
public void setConsignmentReallocationDTOValidator(org.springframework.validation.Validator consignmentReallocationValidator)
-