Class BasicOrderProcessor
java.lang.Object
com.softslate.commerce.businessobjects.core.BaseBusinessObject
com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
com.softslate.commerce.businessobjects.order.BasicOrderProcessor
- All Implemented Interfaces:
BusinessObject
,BusinessProcessor
,OrderProcessor
Processes business logic affecting orders and other related objects.
BasicOrderProcessor
is the default implementation of the
OrderProcessor
interface for the application.- Author:
- David Tobey
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
deleteIncompleteOrders
(Map parameters) void
deleteOrder
(Map parameters) duplicateOrder
(Order order) Duplicates anOrder
object.editDeleteOrders
(Map parameters) loadAbandonedCartOrders
(String startDate, String endDate, String prevOrdersDate) loadCompletedOrdersByDateRange
(String startDate, String endDate, Collection<String> ignoreStatuses) loadCompletedOrdersByLastModifiedAndStatuses
(String startDate, String endDate, Collection<String> currentStatuses) loadIncompleteOrdersWithPayments
(Map parameters) Queries the system to find orders which have payments but have not been marked complete.int
loadOrderDetails
(int orderNumber) loadOrderFromID
(int orderID) loadOrderFromID
(Map parameters) loadOrderFromNumber
(int orderNumber) loadOrderFromNumber
(Map parameters) loadOrdersAndCount
(Map parameters) loadSavedCartFromToken
(Map parameters) Loads the store's states and countries from the database.postChangedOrderEvent
(Order order, Map parameters) postChangingOrderEvent
(Order order, Map parameters) processSettings
(Map parameters) reprocessOrder
(Order order) Reprocesses the items in anOrder
object by adding them to the user's current cart.Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
formatDateTime, formatPrice, getAppComponents, getAppSettings, getAttributeIDs, getBusinessObjectFactory, getDaoFactory, getEventBus, getInjector, getProductIDs, getSettings, getUser, initialize, isProcessorClassActive, loadMatchingSkus, parseDateTime, parseResponseData, prepareRequestData, sendHTTPGet, sendHTTPPost, sendHTTPPost, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setEventBus, setInjector, setSettings, setUser, updateOrderTotals, updateOrderTotals, updateOrderTotals, utils
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initialize
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessProcessor
getAppComponents, getAppSettings, getBusinessObjectFactory, getDaoFactory, getEventBus, getInjector, getSettings, getUser, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setEventBus, setInjector, setSettings, setUser, utils
-
Field Details
-
log
static org.apache.commons.logging.Log log
-
-
Constructor Details
-
BasicOrderProcessor
public BasicOrderProcessor()
-
-
Method Details
-
loadStatesAndCountries
Description copied from interface:OrderProcessor
Loads the store's states and countries from the database. The Struts layer calls this method when the application starts. The data is kept in the servlet's application scope and displayed to users filling in address information.- Specified by:
loadStatesAndCountries
in interfaceOrderProcessor
- Returns:
- A
StatesAndCountries
object containingCollection
s of the store's states and countries. - Throws:
Exception
-
loadDashboardStatistics
- Specified by:
loadDashboardStatistics
in interfaceOrderProcessor
- Throws:
Exception
-
loadIncompleteOrdersStatistics
- Specified by:
loadIncompleteOrdersStatistics
in interfaceOrderProcessor
- Throws:
Exception
-
deleteIncompleteOrders
- Specified by:
deleteIncompleteOrders
in interfaceOrderProcessor
- Throws:
Exception
-
loadOrdersAndCount
- Specified by:
loadOrdersAndCount
in interfaceOrderProcessor
- Throws:
Exception
-
addOrder
- Specified by:
addOrder
in interfaceOrderProcessor
- Throws:
Exception
-
loadOrderFromID
- Specified by:
loadOrderFromID
in interfaceOrderProcessor
- Throws:
Exception
-
loadOrderFromID
- Throws:
Exception
-
loadOrderFromNumber
- Specified by:
loadOrderFromNumber
in interfaceOrderProcessor
- Throws:
Exception
-
loadOrderFromNumber
- Specified by:
loadOrderFromNumber
in interfaceOrderProcessor
- Throws:
Exception
-
editOrder
- Specified by:
editOrder
in interfaceOrderProcessor
- Throws:
Exception
-
postChangingOrderEvent
- Specified by:
postChangingOrderEvent
in interfaceOrderProcessor
- Throws:
Exception
-
postChangedOrderEvent
- Specified by:
postChangedOrderEvent
in interfaceOrderProcessor
- Throws:
Exception
-
editDeleteOrders
- Specified by:
editDeleteOrders
in interfaceOrderProcessor
- Throws:
Exception
-
deleteOrder
- Specified by:
deleteOrder
in interfaceOrderProcessor
- Throws:
Exception
-
loadOrderDetails
- Specified by:
loadOrderDetails
in interfaceOrderProcessor
- Throws:
Exception
-
duplicateOrder
Description copied from interface:OrderProcessor
Duplicates anOrder
object. Performs a deep copy of its dependancies (excluding primary keys). Used for picking up saved carts.- Specified by:
duplicateOrder
in interfaceOrderProcessor
- Parameters:
order
- TheOrder
to be duplicated.- Returns:
- The duplicated
Order
object. - Throws:
Exception
-
loadSavedCartFromToken
- Specified by:
loadSavedCartFromToken
in interfaceOrderProcessor
- Throws:
Exception
-
reprocessOrder
Description copied from interface:OrderProcessor
Reprocesses the items in anOrder
object by adding them to the user's current cart. Used for picking up saved carts.- Specified by:
reprocessOrder
in interfaceOrderProcessor
- Parameters:
order
- TheOrder
whose items are to be reprocessed.- Returns:
- a
Map
containing the results of the reprocessing. - Throws:
Exception
-
loadMaxOrderID
- Specified by:
loadMaxOrderID
in interfaceOrderProcessor
- Throws:
Exception
-
loadIncompleteOrdersWithPayments
Description copied from interface:OrderProcessor
Queries the system to find orders which have payments but have not been marked complete. This conditions indicates that a payment was submitted but something went wrong during the process.- Specified by:
loadIncompleteOrdersWithPayments
in interfaceOrderProcessor
- Parameters:
parameters
- AMap
containingString
values olderThanDays, olderThanHours which can be parsed to anInteger
.- Returns:
- a
Collection
containing the orders if any. - Throws:
Exception
-
loadCompletedOrdersByDateRange
public Collection<Order> loadCompletedOrdersByDateRange(String startDate, String endDate, Collection<String> ignoreStatuses) throws Exception - Specified by:
loadCompletedOrdersByDateRange
in interfaceOrderProcessor
- Throws:
Exception
-
loadAbandonedCartOrders
public Collection<Order> loadAbandonedCartOrders(String startDate, String endDate, String prevOrdersDate) throws Exception - Specified by:
loadAbandonedCartOrders
in interfaceOrderProcessor
- Throws:
Exception
-
loadCompletedOrdersByLastModifiedAndStatuses
public Collection<Order> loadCompletedOrdersByLastModifiedAndStatuses(String startDate, String endDate, Collection<String> currentStatuses) throws Exception - Specified by:
loadCompletedOrdersByLastModifiedAndStatuses
in interfaceOrderProcessor
- Throws:
Exception
-
processSettings
- Throws:
Exception
-