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
-
Constructor Summary
-
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 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) wrapAction
(BaseOrderManagementAction action, BaseForm baseForm) PopulatebaseForm
with user, order, and customer objects all derived from itsorderID
property, and passbaseForm
toaction
'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: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 interfaceOrderManagementUtils
- Returns:
- the shipping option, or null if it could not be found
-
findCouponCodes
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 interfaceOrderManagementUtils
- Returns:
- a Collection of strings
-
findOrderChanges
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 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:OrderManagementUtils
PopulatebaseForm
with user, order, and customer objects all derived from itsorderID
property, and passbaseForm
toaction
'sBaseOrderManagementAction.processOrderManagementAction(com.softslate.commerce.customer.core.BaseForm)
method.- Specified by:
wrapAction
in 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
-