Class OrderController
- java.lang.Object
-
- de.hybris.platform.ycommercewebservices.v1.controller.BaseController
-
- de.hybris.platform.ycommercewebservices.v1.controller.OrderController
-
@Controller("orderControllerV1") @RequestMapping("/{baseSiteId}/orders") public class OrderController extends BaseControllerWeb Service Controller for the ORDERS resource. All methods check orders of the current user. Methods require basic authentication and are restricted to https channel.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.ycommercewebservices.v1.controller.BaseController
DEFAULT_CURRENT_PAGE, DEFAULT_PAGE_SIZE
-
-
Constructor Summary
Constructors Constructor Description OrderController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OrderHistoriesDatacreateOrderHistoriesData(SearchPageData<OrderHistoryData> result)OrderStatusUpdateElementDataListexpressUpdate(java.lang.String timestamp, java.lang.String baseSiteId)Web service handler for order status update feed.protected java.util.Set<OrderStatus>extractOrderStatuses(java.lang.String statuses)protected voidfilterOrderStatusQueue(OrderStatusUpdateElementDataList orderStatusUpdateDataList, java.lang.String baseSiteId)OrderDatagetOrder(java.lang.String code)Web service for getting current user's order information by order code.
Sample call: https://localhost:9002/rest/v1/mysite/orders/1234
This method requires authentication.
Method type :GET.
Method is restricted forHTTPSchannel.OrderDatagetOrderByGuid(java.lang.String guid)Web service for getting order information by order GUID.
Sample call: https://localhost:9002/rest/v1/mysite/orders/byGuid/ea134b389f3d04b4821f51aa55c79f0766974f5f
Method type :GET.
Method is restricted forHTTPSchannel.OrderHistoriesDatagetPagedOrdersForStatuses(java.lang.String statuses, int currentPage, int pageSize, java.lang.String sort)Web service for getting current user's order history data.
Sample call: https://localhost:9002/rest/v1/mysite/orders?statuses=COMPLETED,CANCELLED&pageSize=5¤tPage=0
This method requires authentication.
Method type :GET.
Method is restricted forHTTPSchannel.-
Methods inherited from class de.hybris.platform.ycommercewebservices.v1.controller.BaseController
handleErrorInternal, handleModelNotFoundException, sanitize
-
-
-
-
Method Detail
-
getOrder
@Secured("ROLE_CUSTOMERGROUP") @RequestMapping(value="/{code}", method=GET) @ResponseBody public OrderData getOrder(@PathVariable java.lang.String code)Web service for getting current user's order information by order code.
Sample call: https://localhost:9002/rest/v1/mysite/orders/1234
This method requires authentication.
Method type :GET.
Method is restricted forHTTPSchannel.- Parameters:
code- - order code - must be given as path variable.- Returns:
OrderDataas response body.
-
getOrderByGuid
@Secured("ROLE_CLIENT") @RequestMapping(value="/byGuid/{guid}", method=GET) @ResponseBody public OrderData getOrderByGuid(@PathVariable java.lang.String guid)Web service for getting order information by order GUID.
Sample call: https://localhost:9002/rest/v1/mysite/orders/byGuid/ea134b389f3d04b4821f51aa55c79f0766974f5f
Method type :GET.
Method is restricted forHTTPSchannel.- Parameters:
guid- - order guid - must be given as path variable.- Returns:
OrderDataas response body.
-
getPagedOrdersForStatuses
@Secured("ROLE_CUSTOMERGROUP") @RequestMapping(method=GET) @ResponseBody public OrderHistoriesData getPagedOrdersForStatuses(@RequestParam(required=false) java.lang.String statuses, @RequestParam(required=false,defaultValue="0") int currentPage, @RequestParam(required=false,defaultValue="20") int pageSize, @RequestParam(required=false) java.lang.String sort)Web service for getting current user's order history data.
Sample call: https://localhost:9002/rest/v1/mysite/orders?statuses=COMPLETED,CANCELLED&pageSize=5¤tPage=0
This method requires authentication.
Method type :GET.
Method is restricted forHTTPSchannel.- Parameters:
statuses- - filter for order statuses- optionalcurrentPage- - pagination parameter- optionalpageSize- -PaginationDataparameter - optionalsort- - sort criterion- Returns:
OrderDataas response body.
-
expressUpdate
@Secured("ROLE_TRUSTED_CLIENT") @RequestMapping(value="/statusFeed", method=GET) @ResponseBody public OrderStatusUpdateElementDataList expressUpdate(@RequestParam java.lang.String timestamp, @PathVariable java.lang.String baseSiteId)Web service handler for order status update feed. Returns only elements from the current baseSite newer than specified timestamp. Sample Call: http://localhost:9001/rest/v1/{SITE}/orders/statusFeed
This method requires trusted client authentication.
Method type :GET.
Method is restricted forHTTPSchannel.- Parameters:
timestamp- - time in ISO-8601 format- Returns:
OrderStatusUpdateElementDataList
-
filterOrderStatusQueue
protected void filterOrderStatusQueue(OrderStatusUpdateElementDataList orderStatusUpdateDataList, java.lang.String baseSiteId)
-
extractOrderStatuses
protected java.util.Set<OrderStatus> extractOrderStatuses(java.lang.String statuses)
-
createOrderHistoriesData
protected OrderHistoriesData createOrderHistoriesData(SearchPageData<OrderHistoryData> result)
-
-