Class OrderManagementUtilsImpl
java.lang.Object
com.softslate.commerce.administrator.ordermanagement.OrderManagementUtilsImpl
- All Implemented Interfaces:
OrderManagementUtils
OrderManagementUtilsImpl is the default implementation of the
OrderManagementUtils interface for the application.- Author:
- David Tobey
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindCouponCodes(Order order) Given an order object, return a Collection of all the coupon codes used by OrderDiscount objects under the Order.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.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.performWrappedAction(BaseOrderManagementAction action, BaseForm baseForm) protected voidsaveErrors(javax.servlet.http.HttpServletRequest request, org.apache.struts.action.ActionMessages errors) protected voidsaveMessages(javax.servlet.http.HttpServletRequest request, org.apache.struts.action.ActionMessages messages) wrapAction(BaseOrderManagementAction action, BaseForm baseForm) PopulatebaseFormwith user, order, and customer objects all derived from itsorderIDproperty, and passbaseFormtoaction'sBaseOrderManagementAction.processOrderManagementAction(com.softslate.commerce.customer.core.BaseForm)method.
-
Field Details
-
log
static org.apache.commons.logging.Log log
-
-
Constructor Details
-
OrderManagementUtilsImpl
public OrderManagementUtilsImpl()
-
-
Method Details
-
findPreviousShippingOption
Description copied from interface:OrderManagementUtilsGiven 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:
findPreviousShippingOptionin interfaceOrderManagementUtils- Returns:
- the shipping option, or null if it could not be found
-
findCouponCodes
Description copied from interface:OrderManagementUtilsGiven an order object, return a Collection of all the coupon codes used by OrderDiscount objects under the Order.- Specified by:
findCouponCodesin interfaceOrderManagementUtils- Returns:
- a Collection of strings
-
findOrderChanges
Description copied from interface:OrderManagementUtilsGiven an order and another order to compare it to, return a Map describing the differences between the two orders.- Specified by:
findOrderChangesin interfaceOrderManagementUtils- 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
Description copied from interface:OrderManagementUtilsPopulatebaseFormwith user, order, and customer objects all derived from itsorderIDproperty, and passbaseFormtoaction'sBaseOrderManagementAction.processOrderManagementAction(com.softslate.commerce.customer.core.BaseForm)method.- Specified by:
wrapActionin interfaceOrderManagementUtils- Parameters:
action- object whose processOrderManagementAction method to callbaseForm- request context- Returns:
- Struts forward name, e.g., "success" or "exception"
- Throws:
Exception- See Also:
-
performWrappedAction
public Map performWrappedAction(BaseOrderManagementAction action, BaseForm baseForm) throws Exception - Throws:
Exception
-