Class BasicOrderSettingProcessor
java.lang.Object
com.softslate.commerce.businessobjects.core.BaseBusinessObject
com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
com.softslate.commerce.businessobjects.order.BasicOrderSettingProcessor
- All Implemented Interfaces:
BusinessObject
,BusinessProcessor
,OrderSettingProcessor
public class BasicOrderSettingProcessor
extends BaseBusinessProcessor
implements OrderSettingProcessor
Processes business logic having to do with order settings. Created in the
Struts layer in response to requests for viewing, editing, adding, and
deleting order settings.
BasicOrderSettingProcessor
is the default implementation of the
OrderSettingProcessor
interface for the application.
- Author:
- Jason
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addOrderSetting
(Map parameters) Adds an order setting directly by using only parameters in the map which should also contain the orderID param.void
addOrUpdateOrderSetting
(Order order, OrderSetting orderSetting, boolean commitOrder) Adds or updates an orderSetting for a given order.void
deleteOrderSetting
(Map parameters) Deletes an order setting from the database.void
editOrderSetting
(Map parameters) Updates an order setting in the db using the parameters given.findOrderSettingByCode
(Order order, String code) Find the order setting by code for a given orderloadOrderSettingFromID
(Map parameters) Loads a disconnected OrderSetting bean.loadOrderSettingObjectFromID
(Map parameters) Loads a connected OrderSetting bean from the database.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
-
BasicOrderSettingProcessor
public BasicOrderSettingProcessor()
-
-
Method Details
-
addOrderSetting
Description copied from interface:OrderSettingProcessor
Adds an order setting directly by using only parameters in the map which should also contain the orderID param. This method would usually be used from a form that only has the order setting info. This would require an refresh of a connected order object for it to show in the orderSettings property- Specified by:
addOrderSetting
in interfaceOrderSettingProcessor
- Parameters:
parameters
- Map that should include the orderSetting fields including the orderID- Throws:
Exception
-
loadOrderSettingFromID
Description copied from interface:OrderSettingProcessor
Loads a disconnected OrderSetting bean. This does not actually return the connected OrderSetting, but rather a copy- Specified by:
loadOrderSettingFromID
in interfaceOrderSettingProcessor
- Returns:
- Throws:
Exception
-
loadOrderSettingObjectFromID
Description copied from interface:OrderSettingProcessor
Loads a connected OrderSetting bean from the database.- Specified by:
loadOrderSettingObjectFromID
in interfaceOrderSettingProcessor
- Returns:
- Throws:
Exception
-
editOrderSetting
Description copied from interface:OrderSettingProcessor
Updates an order setting in the db using the parameters given. One would have to refresh the order object to get this updated information as it is not connected- Specified by:
editOrderSetting
in interfaceOrderSettingProcessor
- Throws:
Exception
-
deleteOrderSetting
Description copied from interface:OrderSettingProcessor
Deletes an order setting from the database. One would have to refresh the order object to get this updated information as it is not connected.- Specified by:
deleteOrderSetting
in interfaceOrderSettingProcessor
- Throws:
Exception
-
findOrderSettingByCode
Description copied from interface:OrderSettingProcessor
Find the order setting by code for a given order- Specified by:
findOrderSettingByCode
in interfaceOrderSettingProcessor
- Parameters:
order
- The Order under which the OrderSetting is foundcode
- The code of the OrderSetting
-
addOrUpdateOrderSetting
public void addOrUpdateOrderSetting(Order order, OrderSetting orderSetting, boolean commitOrder) throws Exception Description copied from interface:OrderSettingProcessor
Adds or updates an orderSetting for a given order. The order should be a connected object while the OrderSetting should be treated as a simple transfer object (TO) without setOrderID or setOrder actually set. If the order contains the orderSetting.code, the data will be updated otherwise the a new setting will be added.- Specified by:
addOrUpdateOrderSetting
in interfaceOrderSettingProcessor
- Throws:
Exception
-