Class OmsOrdersController
java.lang.Object
de.hybris.platform.ordermanagementwebservices.controllers.OmsBaseController
de.hybris.platform.ordermanagementwebservices.controllers.order.OmsOrdersController
WebResource exposing
OmsOrderFacade
http://host:port/ordermanagementwebservices/orders-
Field Summary
Fields inherited from class de.hybris.platform.ordermanagementwebservices.controllers.OmsBaseController
ADMIN_GROUP, CUSTOMER_SUPPORT_ADMINISTRATOR_GROUP, CUSTOMER_SUPPORT_AGENT_GROUP, CUSTOMER_SUPPORT_MANAGER_GROUP, dataMapper, DEFAULT_CURRENT_PAGE, DEFAULT_FIELD_SET, DEFAULT_PAGE_SIZE, DEFAULT_SORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapprovePotentiallyFraudulentOrder(@NotNull String code) Request to approve a potentially fraudulent ordercreateCancelRequest(OrderCancelRequestWsDTO orderCancelRequestWsDTO, @NotNull String code) Request to create order cancellation in the systemprotected Set<OrderStatus>extractOrderStatuses(String statuses) Populates a set ofOrderStatusout of the provided stringRequest to get allCancelReasonin the systemgetOrderEntriesForOrderCode(String code, String fields, int currentPage, int pageSize, String sort) Request to get orderEntries for the givenAbstractOrderModel.CODEgetOrderEntryForOrderCodeAndEntryNumber(String code, String entryNumber, String fields) Request to get orderEntry for the givenAbstractOrderModel.CODEandAbstractOrderEntryModel.ENTRYNUMBERgetOrderForCode(String code, String fields) Request to get an order by codegetOrderFraudReports(String code, String fields) Request to get fraud reports for a certain orderRequest to get all orders in the systemgetOrdersByStatus(String orderStatuses, String fields, int currentPage, int pageSize, String sort) Request to get all orders with certain order status(es)Request to get allOrderStatusin the systemvoidmanuallyReleaseDeliveryCostCommit(@NotNull String code) Request to manually release theOrderModelfrom the waiting step after delivery cost commit fails.voidmanuallyReleasePaymentReauth(@NotNull String code) Request to manually release theOrderModelfrom the waiting step after payment reauth fails.voidmanuallyReleasePaymentVoid(@NotNull String code) Request to manually release theOrderModelfrom the waiting step after payment void fails.voidmanuallyReleaseTaxCommit(@NotNull String code) Request to manually release theOrderModelform the waiting step after tax commit has failed.voidmanuallyReleaseTaxRequote(@NotNull String code) Request to manually release theOrderModelform the waiting step after tax requote fails.voidmanuallyReleaseTaxVoid(@NotNull String code) Request to manually release theOrderModelfrom the waiting step after tax void fails.voidrejectPotentiallyFraudulentOrder(@NotNull String code) Request to reject a potentially fraudulent ordersubmitOrder(OrderRequestWsDTO orderRequestWsDTO, String fields) Request to submit order in the systemprotected voidvalidateOrderRequest(OrderRequestWsDTO orderRequestWsDTO) ValidatesOrderRequestWsDTOfor null checksMethods inherited from class de.hybris.platform.ordermanagementwebservices.controllers.OmsBaseController
createPageable, validate
-
Constructor Details
-
OmsOrdersController
public OmsOrdersController()
-
-
Method Details
-
getOrders
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(method=GET) @ResponseBody public OrderSearchPageWsDto getOrders(@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 orders in 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:
- the list of orders
-
getOrderForCode
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/{code}", method=GET) @ResponseBody public OrderWsDTO getOrderForCode(@PathVariable String code, @RequestParam(required=false,defaultValue="DEFAULT") String fields) Request to get an order by code- Parameters:
code- the code of the requested orderfields- defaulted to DEFAULT but can be FULL or BASIC- Returns:
- the order
-
getOrdersByStatus
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="status/{orderStatuses}", method=GET) @ResponseBody public OrderSearchPageWsDto getOrdersByStatus(@PathVariable String orderStatuses, @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 all orders with certain order status(es)- Parameters:
orderStatuses- a list of valid order statuses separated 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:
- the list of orders fulfilling the above conditions
- Throws:
WebserviceValidationException- in case of passing a wrong order status validation exception will be thrown
-
getOrderStatuses
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/statuses", method=GET) @ResponseBody public OrderStatusListWsDTO getOrderStatuses()Request to get allOrderStatusin the system- Returns:
- list of order statuses
-
getOrderEntriesForOrderCode
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/entries", method=GET) @ResponseBody public OrderEntrySearchPageWsDTO getOrderEntriesForOrderCode(@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 orderEntries for the givenAbstractOrderModel.CODE- Parameters:
code- order's code for the requested order 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:
- the list of orderEntries fulfilling the above conditions
-
getOrderEntryForOrderCodeAndEntryNumber
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/entries/{entryNumber}", method=GET) @ResponseBody public OrderEntryWsDTO getOrderEntryForOrderCodeAndEntryNumber(@PathVariable String code, @PathVariable String entryNumber, @RequestParam(required=false,defaultValue="DEFAULT") String fields) Request to get orderEntry for the givenAbstractOrderModel.CODEandAbstractOrderEntryModel.ENTRYNUMBER- Parameters:
code- order's code for the requested order entriesentryNumber- the entry numberfields- defaulted to DEFAULT but can be FULL or BASIC- Returns:
- the list of orderEntries fulfilling the above conditions
-
getCancelReason
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/cancel-reasons", method=GET) @ResponseBody public CancelReasonListWsDTO getCancelReason()Request to get allCancelReasonin the system- Returns:
- list of cancel reasons
-
getOrderFraudReports
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/fraud-reports", method=GET) @ResponseBody public FraudReportListWsDTO getOrderFraudReports(@PathVariable String code, @RequestParam(required=false,defaultValue="DEFAULT") String fields) Request to get fraud reports for a certain order- Parameters:
code- order's code for which to get the fraud reportsfields- defaulted to DEFAULT but can be FULL or BASIC- Returns:
- list of the order's fraud reports
-
submitOrder
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(CREATED) @ResponseBody public OrderWsDTO submitOrder(@RequestBody OrderRequestWsDTO orderRequestWsDTO, @RequestParam(required=false,defaultValue="DEFAULT") String fields) Request to submit order in the system- Parameters:
fields- defaulted to DEFAULT but can be FULL or BASICorderRequestWsDTO- object representingOrderRequestWsDTO- Returns:
- submitted order
-
approvePotentiallyFraudulentOrder
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/fraud-reports/approve", method=POST) @ResponseStatus(OK) public void approvePotentiallyFraudulentOrder(@PathVariable @NotNull @NotNull String code) throws IllegalStateException Request to approve a potentially fraudulent order- Parameters:
code- order's code for which to approve the fraud check- Throws:
IllegalStateException- when the order is not in theOrderStatus.WAIT_FRAUD_MANUAL_CHECKstatus
-
rejectPotentiallyFraudulentOrder
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/fraud-reports/reject", method=POST) @ResponseStatus(OK) public void rejectPotentiallyFraudulentOrder(@PathVariable @NotNull @NotNull String code) throws IllegalStateException Request to reject a potentially fraudulent order- Parameters:
code- order's code for which to reject the fraud check- Throws:
IllegalStateException- when the order is not in theOrderStatus.WAIT_FRAUD_MANUAL_CHECKstatus
-
createCancelRequest
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/cancel", method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(CREATED) @ResponseBody public OrderCancelRecordEntryWsDTO createCancelRequest(@RequestBody OrderCancelRequestWsDTO orderCancelRequestWsDTO, @PathVariable @NotNull @NotNull String code) Request to create order cancellation in the system- Parameters:
orderCancelRequestWsDTO- object representingOrderCancelRequestWsDTOcode- code of the order to be cancelled- Returns:
OrderCancelRecordEntryWsDTOshowing the created cancel record
-
manuallyReleasePaymentVoid
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/manual/void-payment", method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(OK) public void manuallyReleasePaymentVoid(@PathVariable @NotNull @NotNull String code) Request to manually release theOrderModelfrom the waiting step after payment void fails.- Parameters:
code- theAbstractOrderModel.CODEfor the order to be released
-
manuallyReleaseTaxVoid
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/manual/void-tax", method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(OK) public void manuallyReleaseTaxVoid(@PathVariable @NotNull @NotNull String code) Request to manually release theOrderModelfrom the waiting step after tax void fails.- Parameters:
code- theAbstractOrderModel.CODEfor the order to be released
-
manuallyReleaseTaxCommit
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @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 manually release theOrderModelform the waiting step after tax commit has failed.- Parameters:
code- theAbstractOrderModel.CODEfor the order to be released
-
manuallyReleaseTaxRequote
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/manual/requote-tax", method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(OK) public void manuallyReleaseTaxRequote(@PathVariable @NotNull @NotNull String code) Request to manually release theOrderModelform the waiting step after tax requote fails.- Parameters:
code- theAbstractOrderModel.CODEfor the order to be released
-
manuallyReleasePaymentReauth
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/manual/reauth-payment", method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(OK) public void manuallyReleasePaymentReauth(@PathVariable @NotNull @NotNull String code) Request to manually release theOrderModelfrom the waiting step after payment reauth fails.- Parameters:
code- theAbstractOrderModel.CODEfor the order to be released
-
manuallyReleaseDeliveryCostCommit
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/manual/delivery-cost-commit", method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(OK) public void manuallyReleaseDeliveryCostCommit(@PathVariable @NotNull @NotNull String code) Request to manually release theOrderModelfrom the waiting step after delivery cost commit fails.- Parameters:
code- theAbstractOrderModel.CODEfor the order to be released
-
validateOrderRequest
ValidatesOrderRequestWsDTOfor null checks- Parameters:
orderRequestWsDTO- theOrderRequestWsDTO
-
extractOrderStatuses
Populates a set ofOrderStatusout of the provided string- Parameters:
statuses- a comma-separated string that representsOrderStatus- Returns:
- the newly populated
Set<OrderStatus>
-
getOmsOrderFacade
-