Interface OrderMultishipOptionService

All Known Implementing Classes:
OrderMultishipOptionServiceImpl

public interface OrderMultishipOptionService
Service to interact with OrderMultishipOptions
Author:
Andre Azzolini (apazzolini)
  • Method Details

    • save

      OrderMultishipOption save(OrderMultishipOption orderMultishipOption)
      Saves the given OrderMultishipOption and returns the saved entity
      Parameters:
      orderMultishipOption -
      Returns:
      the saved entity
    • findOrderMultishipOptions

      List<OrderMultishipOption> findOrderMultishipOptions(Long orderId)
      Finds all OrderMultishipOptions associated with the given Order based on the orderId
      Parameters:
      orderId - the order id to find OrderMultishipOptions for
      Returns:
      the associated OrderMultishipOptions
    • findOrderItemOrderMultishipOptions

      List<OrderMultishipOption> findOrderItemOrderMultishipOptions(Long orderItemId)
      Finds all OrderMultishipOptions associated with the given Order Item based on the order item id
      Parameters:
      orderItemId - the orderItem id to find OrderMultishipOptions for
      Returns:
      the associated OrderMultishipOptions
    • create

      Creates a new instance of the OrderMultishipOption. The default Broadleaf implementation will create an instance based on what is configured in the EntityConfiguration.
      Returns:
      the newly created OrderMultishipOption
    • deleteAllOrderMultishipOptions

      void deleteAllOrderMultishipOptions(Order order)
      Removes all OrderMultishipOptions for this Order permanently.
      Parameters:
      order -
    • deleteOrderItemOrderMultishipOptions

      void deleteOrderItemOrderMultishipOptions(Long orderItemId)
      Removes all OrderMultishipOptions associated with the OrderItem represented by this orderItemId permanently.
      Parameters:
      orderItemId -
    • deleteOrderItemOrderMultishipOptions

      void deleteOrderItemOrderMultishipOptions(Long orderItemId, int numToDelete)
      Removes up to numToDelete OrderMultishipOptions associated with the OrderItem represented by this orderItemId permanently.
      Parameters:
      orderItemId -
      numToDelete - the maximum number of occurrences of this orderItemId to delete
      See Also:
    • generateOrderMultishipOptions

      List<OrderMultishipOption> generateOrderMultishipOptions(Order order)
      Generates the blank set of OrderMultishipOptions for a given order. Note that the default Broadleaf implementation splits up all DiscreteOrderItems in the given order into instances of OrderMultishipOption such that each instance assumes its quantity is one. Also note that this will not set the Address or the FulfillmentOption for any of the generated options.
      Parameters:
      order - the order to generate OrderMultishipOptions for
      Returns:
      the OrderMultishipOptions generated for the Order.
    • getOrGenerateOrderMultishipOptions

      List<OrderMultishipOption> getOrGenerateOrderMultishipOptions(Order order)
      If this order has associated OrderMultishipOptions, this method will return those options. If there are items in the order that do not have associated options, options for those items will be generated and attached to the existing options.
      Parameters:
      order -
      Returns:
      the OrderMultishipOptions for this Order
      See Also:
    • getOrderMultishipOptionsFromDTOs

      List<OrderMultishipOption> getOrderMultishipOptionsFromDTOs(Order order, List<OrderMultishipOptionDTO> optionDtos)
      Given the (potetially only partially filled out) OrderMultishipOptionDTO objects, builds out the associated OrderMultishipOption objects. This is done by looking up the non-null fields in the optionDtos for their associated entity.

      Note that the only potentially null fields are address and location ids.

      Parameters:
      order -
      optionDtos -
      Returns:
      the associated OrderMultishipOptions
    • saveOrderMultishipOptions

      void saveOrderMultishipOptions(Order order, List<OrderMultishipOptionDTO> optionDTOs)
      Associates the appropriate objects based on the OrderMultishipOptionDTOs to OrderMultishipOption instances, associates them with the given order, and saves the set.

      Note that this method will clear any previously saved OrderMultishipOptions for the requested order before performing the save.

      Parameters:
      order -
      optionDTOs -