Class OmsOrdersController
- java.lang.Object
-
- de.hybris.platform.ordermanagementwebservices.controllers.OmsBaseController
-
- de.hybris.platform.ordermanagementwebservices.controllers.order.OmsOrdersController
-
@Controller @RequestMapping("/orders") public class OmsOrdersController extends OmsBaseControllerWebResource exposingOmsOrderFacadehttp://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 Constructor Description OmsOrdersController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapprovePotentiallyFraudulentOrder(@NotNull java.lang.String code)Request to approve a potentially fraudulent orderOrderCancelRecordEntryWsDTOcreateCancelRequest(OrderCancelRequestWsDTO orderCancelRequestWsDTO, @NotNull java.lang.String code)Request to create order cancellation in the systemprotected java.util.Set<OrderStatus>extractOrderStatuses(java.lang.String statuses)Populates a set ofOrderStatusout of the provided stringCancelReasonListWsDTOgetCancelReason()Request to get allCancelReasonin the systemOmsOrderFacadegetOmsOrderFacade()OrderEntrySearchPageWsDTOgetOrderEntriesForOrderCode(java.lang.String code, java.lang.String fields, int currentPage, int pageSize, java.lang.String sort)Request to get orderEntries for the givenAbstractOrderModel.CODEOrderEntryWsDTOgetOrderEntryForOrderCodeAndEntryNumber(java.lang.String code, java.lang.String entryNumber, java.lang.String fields)Request to get orderEntry for the givenAbstractOrderModel.CODEandAbstractOrderEntryModel.ENTRYNUMBEROrderWsDTOgetOrderForCode(java.lang.String code, java.lang.String fields)Request to get an order by codeFraudReportListWsDTOgetOrderFraudReports(java.lang.String code, java.lang.String fields)Request to get fraud reports for a certain orderOrderSearchPageWsDtogetOrders(java.lang.String fields, int currentPage, int pageSize, java.lang.String sort)Request to get all orders in the systemOrderSearchPageWsDtogetOrdersByStatus(java.lang.String orderStatuses, java.lang.String fields, int currentPage, int pageSize, java.lang.String sort)Request to get all orders with certain order status(es)OrderStatusListWsDTOgetOrderStatuses()Request to get allOrderStatusin the systemvoidmanuallyReleaseDeliveryCostCommit(@NotNull java.lang.String code)Request to manually release theOrderModelfrom the waiting step after delivery cost commit fails.voidmanuallyReleasePaymentReauth(@NotNull java.lang.String code)Request to manually release theOrderModelfrom the waiting step after payment reauth fails.voidmanuallyReleasePaymentVoid(@NotNull java.lang.String code)Request to manually release theOrderModelfrom the waiting step after payment void fails.voidmanuallyReleaseTaxCommit(@NotNull java.lang.String code)Request to manually release theOrderModelform the waiting step after tax commit has failed.voidmanuallyReleaseTaxRequote(@NotNull java.lang.String code)Request to manually release theOrderModelform the waiting step after tax requote fails.voidmanuallyReleaseTaxVoid(@NotNull java.lang.String code)Request to manually release theOrderModelfrom the waiting step after tax void fails.voidrejectPotentiallyFraudulentOrder(@NotNull java.lang.String code)Request to reject a potentially fraudulent orderOrderWsDTOsubmitOrder(OrderRequestWsDTO orderRequestWsDTO, java.lang.String fields)Request to submit order in the systemprotected voidvalidateOrderRequest(OrderRequestWsDTO orderRequestWsDTO)ValidatesOrderRequestWsDTOfor null checks-
Methods inherited from class de.hybris.platform.ordermanagementwebservices.controllers.OmsBaseController
createPageable, validate
-
-
-
-
Method Detail
-
getOrders
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(method=GET) @ResponseBody public OrderSearchPageWsDto getOrders(@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 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 java.lang.String code, @RequestParam(required=false,defaultValue="DEFAULT") java.lang.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 java.lang.String orderStatuses, @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 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 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 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 java.lang.String code, @PathVariable java.lang.String entryNumber, @RequestParam(required=false,defaultValue="DEFAULT") java.lang.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 java.lang.String code, @RequestParam(required=false,defaultValue="DEFAULT") java.lang.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") java.lang.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 java.lang.String code) throws java.lang.IllegalStateExceptionRequest to approve a potentially fraudulent order- Parameters:
code- order's code for which to approve the fraud check- Throws:
java.lang.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 java.lang.String code) throws java.lang.IllegalStateExceptionRequest to reject a potentially fraudulent order- Parameters:
code- order's code for which to reject the fraud check- Throws:
java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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
protected void validateOrderRequest(OrderRequestWsDTO orderRequestWsDTO)
ValidatesOrderRequestWsDTOfor null checks- Parameters:
orderRequestWsDTO- theOrderRequestWsDTO
-
extractOrderStatuses
protected java.util.Set<OrderStatus> extractOrderStatuses(java.lang.String statuses)
Populates a set ofOrderStatusout of the provided string- Parameters:
statuses- a comma-separated string that representsOrderStatus- Returns:
- the newly populated
Set
-
getOmsOrderFacade
public OmsOrderFacade getOmsOrderFacade()
-
-