Class OrderHistoryEndpoint
java.lang.Object
com.broadleafcommerce.rest.api.endpoint.BaseEndpoint
com.broadleafcommerce.rest.api.endpoint.order.OrderHistoryEndpoint
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.MessageSourceAware
@FrameworkRestController
@FrameworkMapping(value="/orders",
produces={"application/json","application/xml"})
public class OrderHistoryEndpoint
extends BaseEndpoint
This endpoint depends on JAX-RS. It should be extended by components that actually wish
to provide an endpoint. The annotations such as @Path, @Scope, @Context, @PathParam, @QueryParam,
- Author:
- Jay Aisenbrey (cja769)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.broadleafcommerce.core.order.service.OrderServiceFields inherited from class com.broadleafcommerce.rest.api.endpoint.BaseEndpoint
context, messageSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindAllOrdersForCustomer(jakarta.servlet.http.HttpServletRequest request) Finds all of the orders for the customer set on the requestfindOrderById(jakarta.servlet.http.HttpServletRequest request, Long orderId) Finds order, if it exists, whose id isorderIdprotected OrderWrapperfindOrderByOrderNumber(jakarta.servlet.http.HttpServletRequest request, String orderNumber) findOrdersForCustomer(jakarta.servlet.http.HttpServletRequest request, String orderStatus, String orderNumber) Finds all of the orders with an order status oforderStatusfor the customer set on the requestMethods inherited from class com.broadleafcommerce.rest.api.endpoint.BaseEndpoint
getApplicationContext, getMessageSource, setApplicationContext, setMessageSource
-
Field Details
-
orderService
protected org.broadleafcommerce.core.order.service.OrderService orderService
-
-
Constructor Details
-
OrderHistoryEndpoint
public OrderHistoryEndpoint()
-
-
Method Details
-
findOrdersForCustomer
@FrameworkMapping(method=GET) public List<OrderWrapper> findOrdersForCustomer(jakarta.servlet.http.HttpServletRequest request, @RequestParam(value="orderStatus",defaultValue="SUBMITTED") String orderStatus, @RequestParam(value="orderNumber",required=false) String orderNumber) Finds all of the orders with an order status oforderStatusfor the customer set on the request- Parameters:
request-orderStatus-- Returns:
-
findOrderByOrderNumber
protected OrderWrapper findOrderByOrderNumber(jakarta.servlet.http.HttpServletRequest request, String orderNumber) -
findAllOrdersForCustomer
@FrameworkMapping(value="/summary", method=GET) public List<OrderWrapper> findAllOrdersForCustomer(jakarta.servlet.http.HttpServletRequest request) Finds all of the orders for the customer set on the request- Parameters:
request-- Returns:
-
findOrderById
@FrameworkMapping(value="/{orderId}", method=GET) public OrderWrapper findOrderById(jakarta.servlet.http.HttpServletRequest request, @PathVariable("orderId") Long orderId) Finds order, if it exists, whose id isorderId- Parameters:
request-orderId-- Returns:
-