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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdeleteIncompleteOrders(Map parameters) voiddeleteOrder(Map parameters) duplicateOrder(Order order) Duplicates anOrderobject.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.intloadOrderDetails(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 anOrderobject 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, utilsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initializeMethods 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:OrderProcessorLoads 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:
loadStatesAndCountriesin interfaceOrderProcessor- Returns:
- A
StatesAndCountriesobject containingCollections of the store's states and countries. - Throws:
Exception
-
loadDashboardStatistics
- Specified by:
loadDashboardStatisticsin interfaceOrderProcessor- Throws:
Exception
-
loadIncompleteOrdersStatistics
- Specified by:
loadIncompleteOrdersStatisticsin interfaceOrderProcessor- Throws:
Exception
-
deleteIncompleteOrders
- Specified by:
deleteIncompleteOrdersin interfaceOrderProcessor- Throws:
Exception
-
loadOrdersAndCount
- Specified by:
loadOrdersAndCountin interfaceOrderProcessor- Throws:
Exception
-
addOrder
- Specified by:
addOrderin interfaceOrderProcessor- Throws:
Exception
-
loadOrderFromID
- Specified by:
loadOrderFromIDin interfaceOrderProcessor- Throws:
Exception
-
loadOrderFromID
- Throws:
Exception
-
loadOrderFromNumber
- Specified by:
loadOrderFromNumberin interfaceOrderProcessor- Throws:
Exception
-
loadOrderFromNumber
- Specified by:
loadOrderFromNumberin interfaceOrderProcessor- Throws:
Exception
-
editOrder
- Specified by:
editOrderin interfaceOrderProcessor- Throws:
Exception
-
postChangingOrderEvent
- Specified by:
postChangingOrderEventin interfaceOrderProcessor- Throws:
Exception
-
postChangedOrderEvent
- Specified by:
postChangedOrderEventin interfaceOrderProcessor- Throws:
Exception
-
editDeleteOrders
- Specified by:
editDeleteOrdersin interfaceOrderProcessor- Throws:
Exception
-
deleteOrder
- Specified by:
deleteOrderin interfaceOrderProcessor- Throws:
Exception
-
loadOrderDetails
- Specified by:
loadOrderDetailsin interfaceOrderProcessor- Throws:
Exception
-
duplicateOrder
Description copied from interface:OrderProcessorDuplicates anOrderobject. Performs a deep copy of its dependancies (excluding primary keys). Used for picking up saved carts.- Specified by:
duplicateOrderin interfaceOrderProcessor- Parameters:
order- TheOrderto be duplicated.- Returns:
- The duplicated
Orderobject. - Throws:
Exception
-
loadSavedCartFromToken
- Specified by:
loadSavedCartFromTokenin interfaceOrderProcessor- Throws:
Exception
-
reprocessOrder
Description copied from interface:OrderProcessorReprocesses the items in anOrderobject by adding them to the user's current cart. Used for picking up saved carts.- Specified by:
reprocessOrderin interfaceOrderProcessor- Parameters:
order- TheOrderwhose items are to be reprocessed.- Returns:
- a
Mapcontaining the results of the reprocessing. - Throws:
Exception
-
loadMaxOrderID
- Specified by:
loadMaxOrderIDin interfaceOrderProcessor- Throws:
Exception
-
loadIncompleteOrdersWithPayments
Description copied from interface:OrderProcessorQueries 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:
loadIncompleteOrdersWithPaymentsin interfaceOrderProcessor- Parameters:
parameters- AMapcontainingStringvalues olderThanDays, olderThanHours which can be parsed to anInteger.- Returns:
- a
Collectioncontaining the orders if any. - Throws:
Exception
-
loadCompletedOrdersByDateRange
public Collection<Order> loadCompletedOrdersByDateRange(String startDate, String endDate, Collection<String> ignoreStatuses) throws Exception - Specified by:
loadCompletedOrdersByDateRangein interfaceOrderProcessor- Throws:
Exception
-
loadAbandonedCartOrders
public Collection<Order> loadAbandonedCartOrders(String startDate, String endDate, String prevOrdersDate) throws Exception - Specified by:
loadAbandonedCartOrdersin interfaceOrderProcessor- Throws:
Exception
-
loadCompletedOrdersByLastModifiedAndStatuses
public Collection<Order> loadCompletedOrdersByLastModifiedAndStatuses(String startDate, String endDate, Collection<String> currentStatuses) throws Exception - Specified by:
loadCompletedOrdersByLastModifiedAndStatusesin interfaceOrderProcessor- Throws:
Exception
-
processSettings
- Throws:
Exception
-