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 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.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.
-
Method Details
-
findPreviousShippingOption
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
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
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
PopulatebaseForm
with user, order, and customer objects all derived from itsorderID
property, and passbaseForm
toaction
'sBaseOrderManagementAction.processOrderManagementAction(com.softslate.commerce.customer.core.BaseForm)
method.- Parameters:
action
- object whose processOrderManagementAction method to callbaseForm
- request context- Returns:
- Struts forward name, e.g., "success" or "exception"
- Throws:
Exception
- See Also:
-