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 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
(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 anOrder
object by adding them to the user's current cart.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
-
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
StatesAndCountries
object containingCollection
s 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 anOrder
object. Performs a deep copy of its dependancies (excluding primary keys). Used for picking up saved carts.- Parameters:
order
- TheOrder
to be duplicated.- Returns:
- The duplicated
Order
object. - Throws:
Exception
-
reprocessOrder
Reprocesses the items in anOrder
object by adding them to the user's current cart. Used for picking up saved carts.- Parameters:
order
- TheOrder
whose items are to be reprocessed.- Returns:
- a
Map
containing 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
- AMap
containingString
values olderThanDays, olderThanHours which can be parsed to anInteger
.- Returns:
- a
Collection
containing 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
-