Class OrderNoteEndpoint

java.lang.Object
com.broadleafcommerce.order.web.endpoint.OrderNoteEndpoint

@FrameworkRestController @FrameworkMapping("/orders/{orderId}/notes") @DataRouteByExample(OrderNote.class) public class OrderNoteEndpoint extends Object
Endpoint for management of OrderNotes.
  • Field Details

  • Constructor Details

  • Method Details

    • readAllOrderNotes

      @Policy(permissionRoots="ORDER_NOTE") @FrameworkGetMapping public org.springframework.data.domain.Page<OrderNote> readAllOrderNotes(@ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("orderId") String orderId, cz.jirutka.rsql.parser.ast.Node filters, @PageableDefault(size=50) org.springframework.data.domain.Pageable page)
    • readOrderNoteById

      @Policy(permissionRoots="ORDER_NOTE") @FrameworkGetMapping("/{id}") public OrderNote readOrderNoteById(@ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("orderId") String orderId, @PathVariable("id") String orderNoteId)
    • createOrderNote

      @Policy(permissionRoots="ORDER_NOTE") @FrameworkPostMapping(consumes="application/json") public OrderNote createOrderNote(@ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("orderId") String orderId, @RequestBody OrderNote orderNote)
    • deleteOrderNote

      @Policy(permissionRoots="ORDER_NOTE") @FrameworkDeleteMapping("/{id}") public void deleteOrderNote(@ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("orderId") String orderId, @PathVariable("id") String orderNoteId)
    • ensureOrderExists

      @Deprecated(forRemoval=true, since="2.2.0") protected void ensureOrderExists(@NonNull @NonNull String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 2.2.0. Redundant DB read.
      Ensures that the Order exists before we manage OrderNotes in that order.
      Parameters:
      orderId - ID of the order to check for existence
      contextInfo - context information around sandbox and multitenant state
    • ensureNoteBelongsToOrderAndReturn

      protected OrderNote ensureNoteBelongsToOrderAndReturn(@NonNull @NonNull String orderId, @NonNull @NonNull String orderNoteId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Ensures that the OrderNote is associated with the specified order ID. Also retrieves the order note.
      Parameters:
      orderId - ID of the order to check for association
      orderNoteId - ID of the order note to check for association
      contextInfo - context information around sandbox and multitenant state
      Returns:
      the found order note
      Throws:
      com.broadleafcommerce.data.tracking.core.exception.EntityMissingException - if the order note is not associated to the order
    • setApplicationOnContextInfo

      protected void setApplicationOnContextInfo(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getOrderNoteService

      protected OrderNoteService<OrderNote> getOrderNoteService()
    • getOrderService

      protected OrderService<com.broadleafcommerce.order.client.domain.Order> getOrderService()