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 WarehousingBaseControllerWebResource exposingWarehousingConsignmentFacadehttp://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 Constructor Description WarehousingConsignmentsController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfirmPickupConsignment(java.lang.String code)Request to confirmConsignmentModel's pickupvoidconfirmShipConsignment(java.lang.String code)Request to confirmConsignmentModel's shippingjava.lang.StringconsolidatedPickConsignments(ConsignmentCodesWsDTO consignmentCodes)Request to pick, if applicable, eachConsignmentModelfor the provided list of consignment codes and generate a consolidated pick slip.protected java.util.Set<ConsignmentStatus>extractConsignmentStatuses(java.lang.String statuses)Extract the set ofConsignmentStatusfrom the requestConsignmentEntrySearchPageWsDtogetConsignmentEntriesForConsignmentCode(java.lang.String code, java.lang.String fields, int currentPage, int pageSize, java.lang.String sort)Request to get allConsignmentEntryModelfor the given "code"ConsignmentWsDTOgetConsignmentForCode(java.lang.String code, java.lang.String fields)Request to getConsignmentModelfor the given codeprotected org.springframework.validation.ValidatorgetConsignmentReallocationValidator()ConsignmentSearchPageWsDtogetConsignments(java.lang.String fields, int currentPage, int pageSize, java.lang.String sort)Request to get allConsignmentModelin the systemConsignmentSearchPageWsDtogetConsignmentsByStatus(java.lang.String consignmentStatuses, java.lang.String fields, int currentPage, int pageSize, java.lang.String sort)Request to get allConsignmentModelwith certain consignment status(es)ConsignmentStatusListWsDTOgetConsignmentStatuses()Request to get allConsignmentStatusin the systemDeclineReasonListWsDTOgetDeclineReasons()Request to get allDeclineReasonavailable in the system.java.lang.StringgetExportForm(@NotNull java.lang.String code)Request to get the export form of aConsignmentModelPackagingInfoWsDTOgetPackagingInfo(@NotNull java.lang.String code)Request to getPackagingInfoWsDTOfor the givenConsignmentModel.CODEprotected org.springframework.validation.ValidatorgetPackagingInfoDTOValidator()java.lang.StringgetReturnForm(@NotNull java.lang.String code)Request to get the return form of aConsignmentModeljava.lang.StringgetReturnShippingLabel(@NotNull java.lang.String code)Request to get the return shipping label of a Consignmentjava.lang.StringgetShippingLabel(@NotNull java.lang.String code)Request to get the shipping label of aConsignmentModelWarehouseSearchPageWsDtogetSourcingLocationsForConsignmentCode(java.lang.String code, java.lang.String fields, int currentPage, int pageSize, java.lang.String sort)Request to get all sourcing locations for the given "code"java.lang.BooleanisConsignmentConfirmable(java.lang.String code)Request to check ifConsignmentModelcan be confirmedvoidmanuallyReleasePaymentCapture(@NotNull java.lang.String code)Request to manually releaseConsignmentModelfrom the waiting step after the payment capture has failedvoidmanuallyReleaseTaxCommit(@NotNull java.lang.String code)Request to manully releaseConsignmentModelfrom the waiting step after a tax commit failurejava.lang.StringpackConsignment(@NotNull java.lang.String code, boolean printSlip)Request to pack aConsignmentModeland optionally generate its Pack Labeljava.lang.StringpickConsignment(@NotNull java.lang.String code, boolean printSlip)Request to pick aConsignmentModeland generate its Pick SlipvoidreallocateConsignment(ConsignmentReallocationWsDTO consignmentReallocationWsDTO, @NotNull java.lang.String code)Request to reallocate aConsignmentModelto a new warehouse.voidsetConsignmentReallocationDTOValidator(org.springframework.validation.Validator consignmentReallocationValidator)voidsetPackagingInfoDTOValidator(org.springframework.validation.Validator packagingInfoDTOValidator)PaymentTransactionEntryWsDTOtakePayment(@NotNull java.lang.String code, java.lang.String fields)Request to take a payment for aConsignmentModelConsignmentWsDTOupdatePackagingInfo(PackagingInfoWsDTO packagingInfo, @NotNull java.lang.String code, java.lang.String fields)Request to update aConsignmentModelwith a new Packaging information.-
Methods inherited from class de.hybris.platform.warehousingwebservices.controllers.WarehousingBaseController
createPageable, validate
-
-
-
-
Method Detail
-
getConsignments
@Secured({"ROLE_WAREHOUSEAGENTGROUP","ROLE_WAREHOUSEMANAGERGROUP","ROLE_WAREHOUSEADMINISTRATORGROUP"}) @RequestMapping(method=GET) @ResponseBody public ConsignmentSearchPageWsDto getConsignments(@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 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 java.lang.String code, @RequestParam(required=false,defaultValue="DEFAULT") java.lang.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 java.lang.String code, @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 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 java.lang.String consignmentStatuses, @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) throws WebserviceValidationExceptionRequest 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 java.lang.String code, @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 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 java.lang.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 java.lang.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 java.lang.Boolean isConsignmentConfirmable(@PathVariable java.lang.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 java.lang.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 java.lang.String code, @RequestParam(required=false,defaultValue="DEFAULT") java.lang.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 java.lang.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 java.lang.String pickConsignment(@PathVariable @NotNull @NotNull java.lang.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 java.lang.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 java.lang.String packConsignment(@PathVariable @NotNull @NotNull java.lang.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 java.lang.String getExportForm(@PathVariable @NotNull @NotNull java.lang.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 java.lang.String getShippingLabel(@PathVariable @NotNull @NotNull java.lang.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 java.lang.String getReturnShippingLabel(@PathVariable @NotNull @NotNull java.lang.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 java.lang.String getReturnForm(@PathVariable @NotNull @NotNull java.lang.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 java.lang.String code, @RequestParam(required=false,defaultValue="DEFAULT") java.lang.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 java.lang.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 java.lang.String code)Request to manully releaseConsignmentModelfrom the waiting step after a tax commit failure- Parameters:
code-ConsignmentModel.CODEfor the requested consignment
-
extractConsignmentStatuses
protected java.util.Set<ConsignmentStatus> extractConsignmentStatuses(java.lang.String statuses)
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)
-
-