Interface OrderProcessor
- All Superinterfaces:
BusinessObject,BusinessProcessor
- All Known Implementing Classes:
BasicOrderProcessor
Interface for business logic methods affecting orders and other related
objects.
When the application needs to create an instance that implements
OrderProcessor,
BusinessObjectFactory
finds the name of the Java class to instantiate from the
"orderProcessorImplementer" setting in the
appComponents.properties file.
The default "orderProcessorImplementer" is
BasicOrderProcessor.
- Author:
- David Tobey
-
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(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 item, Map parameters) reprocessOrder(Order order) Reprocesses the items in anOrderobject by adding them to the user's current cart.Methods 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
-
Method Details
-
loadStatesAndCountries
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.- Returns:
- A
StatesAndCountriesobject containingCollections of the store's states and countries. - Throws:
Exception
-
loadDashboardStatistics
- Throws:
Exception
-
loadIncompleteOrdersStatistics
- Throws:
Exception
-
deleteIncompleteOrders
- Throws:
Exception
-
loadOrdersAndCount
- Throws:
Exception
-
addOrder
- Throws:
Exception
-
loadOrderFromID
- Throws:
Exception
-
editOrder
- Throws:
Exception
-
editDeleteOrders
- Throws:
Exception
-
deleteOrder
- Throws:
Exception
-
loadOrderDetails
- Throws:
Exception
-
loadSavedCartFromToken
- Throws:
Exception
-
loadMaxOrderID
- Throws:
Exception
-
duplicateOrder
Duplicates anOrderobject. Performs a deep copy of its dependancies (excluding primary keys). Used for picking up saved carts.- Parameters:
order- TheOrderto be duplicated.- Returns:
- The duplicated
Orderobject. - Throws:
Exception
-
reprocessOrder
Reprocesses the items in anOrderobject by adding them to the user's current cart. Used for picking up saved carts.- Parameters:
order- TheOrderwhose items are to be reprocessed.- Returns:
- a
Mapcontaining the results of the reprocessing. - Throws:
Exception
-
loadIncompleteOrdersWithPayments
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.- Parameters:
parameters- AMapcontainingStringvalues olderThanDays, olderThanHours which can be parsed to anInteger.- Returns:
- a
Collectioncontaining the orders if any. - Throws:
Exception
-
postChangingOrderEvent
- Throws:
Exception
-
postChangedOrderEvent
- Throws:
Exception
-
loadOrderFromNumber
- Throws:
Exception
-
loadOrderFromNumber
- Throws:
Exception
-
loadCompletedOrdersByDateRange
Collection<Order> loadCompletedOrdersByDateRange(String startDate, String endDate, Collection<String> ignoreStatuses) throws Exception - Throws:
Exception
-
loadAbandonedCartOrders
Collection<Order> loadAbandonedCartOrders(String startDate, String endDate, String prevOrdersDate) throws Exception - Throws:
Exception
-
loadCompletedOrdersByLastModifiedAndStatuses
Collection<Order> loadCompletedOrdersByLastModifiedAndStatuses(String startDate, String endDate, Collection<String> currentStatuses) throws Exception - Throws:
Exception
-