com.softslate.commerce.administrator.ordermanagement
Class OrderManagementUtilsImpl

java.lang.Object
  extended by com.softslate.commerce.administrator.ordermanagement.OrderManagementUtilsImpl
All Implemented Interfaces:
OrderManagementUtils

public class OrderManagementUtilsImpl
extends java.lang.Object
implements OrderManagementUtils

OrderManagementUtilsImpl is the default implementation of the OrderManagementUtils interface for the application.

Author:
David Tobey
See Also:
ActionUtils

Field Summary
(package private) static org.apache.commons.logging.Log log
           
 
Constructor Summary
OrderManagementUtilsImpl()
           
 
Method Summary
 java.util.Collection findCouponCodes(Order order)
          Given an order object, return a Collection of all the coupon codes used by OrderDiscount objects under the Order.
 java.util.Map findOrderChanges(Order order, Order originalOrder, java.util.Collection newOrderItems)
          Given an order and another order to compare it to, return a Map describing the differences between the two orders.
 java.util.Map findPreviousShippingOption(java.util.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.
 java.util.Map performWrappedAction(BaseOrderManagementAction action, BaseForm baseForm)
           
protected  void saveErrors(javax.servlet.http.HttpServletRequest request, org.apache.struts.action.ActionMessages errors)
           
protected  void saveMessages(javax.servlet.http.HttpServletRequest request, org.apache.struts.action.ActionMessages messages)
           
 java.lang.String wrapAction(BaseOrderManagementAction action, BaseForm baseForm)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

static org.apache.commons.logging.Log log
Constructor Detail

OrderManagementUtilsImpl

public OrderManagementUtilsImpl()
Method Detail

findPreviousShippingOption

public java.util.Map findPreviousShippingOption(java.util.Collection options,
                                                Order order,
                                                BaseForm baseForm)
Description copied from interface: OrderManagementUtils
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.

Specified by:
findPreviousShippingOption in interface OrderManagementUtils
Returns:
the shipping option, or null if it could not be found

findCouponCodes

public java.util.Collection findCouponCodes(Order order)
Description copied from interface: OrderManagementUtils
Given an order object, return a Collection of all the coupon codes used by OrderDiscount objects under the Order.

Specified by:
findCouponCodes in interface OrderManagementUtils
Returns:
a Collection of strings

findOrderChanges

public java.util.Map findOrderChanges(Order order,
                                      Order originalOrder,
                                      java.util.Collection newOrderItems)
Description copied from interface: OrderManagementUtils
Given an order and another order to compare it to, return a Map describing the differences between the two orders.

Specified by:
findOrderChanges in interface OrderManagementUtils
Returns:
A Map representing the differences between the two orders.

saveErrors

protected void saveErrors(javax.servlet.http.HttpServletRequest request,
                          org.apache.struts.action.ActionMessages errors)

saveMessages

protected void saveMessages(javax.servlet.http.HttpServletRequest request,
                            org.apache.struts.action.ActionMessages messages)

wrapAction

public java.lang.String wrapAction(BaseOrderManagementAction action,
                                   BaseForm baseForm)
                            throws java.lang.Exception
Description copied from interface: OrderManagementUtils
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.

Specified by:
wrapAction in interface OrderManagementUtils
Parameters:
action - object whose processOrderManagementAction method to call
baseForm - request context
Returns:
Struts forward name, e.g., "success" or "exception"
Throws:
java.lang.Exception
See Also:
BaseOrderManagementAction

performWrappedAction

public java.util.Map performWrappedAction(BaseOrderManagementAction action,
                                          BaseForm baseForm)
                                   throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © SoftSlate, LLC 2003–2010