Interface OrderManagementUtils

All Known Implementing Classes:
OrderManagementUtilsImpl

public interface OrderManagementUtils
Interface for utility methods used by Struts Action classes implement Ajax functionality.

When the application needs to create an instance that implements AjaxUtils, it calls BusinessObjectFactory.createUtilsObject(java.lang.String) , which finds the name of the Java class to instantiate from the "ajaxUtilsImplemeter" setting in the appComponents.properties file.

The default "ajaxUtilsImplemeter" is OrderManagementUtilsImpl.

Author:
David Tobey
  • Method Details

    • findPreviousShippingOption

      Map findPreviousShippingOption(Collection options, Order order, BaseForm baseForm)
      Given a Collection of valid shipping options and an Order object, attempts to find the shippping option within the collection that was previously selected for the order.
      Parameters:
      options -
      order -
      baseForm -
      Returns:
      the shipping option, or null if it could not be found
    • findCouponCodes

      Collection findCouponCodes(Order order)
      Given an order object, return a Collection of all the coupon codes used by OrderDiscount objects under the Order.
      Parameters:
      order -
      Returns:
      a Collection of strings
    • findOrderChanges

      Map findOrderChanges(Order order, Order originalOrder, Collection newOrderItems)
      Given an order and another order to compare it to, return a Map describing the differences between the two orders.
      Parameters:
      order -
      originalOrder -
      newOrderItems -
      Returns:
      A Map representing the differences between the two orders.
    • wrapAction

      String wrapAction(BaseOrderManagementAction action, BaseForm baseForm) throws Exception
      Populate baseForm with user, order, and customer objects all derived from its orderID property, and pass baseForm to action's BaseOrderManagementAction.processOrderManagementAction(com.softslate.commerce.customer.core.BaseForm) method.
      Parameters:
      action - object whose processOrderManagementAction method to call
      baseForm - request context
      Returns:
      Struts forward name, e.g., "success" or "exception"
      Throws:
      Exception
      See Also: