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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOrderSetting(Map parameters) Adds an order setting directly by using only parameters in the map which should also contain the orderID param.voidaddOrUpdateOrderSetting(Order order, OrderSetting orderSetting, boolean commitOrder) Adds or updates an orderSetting for a given order.voiddeleteOrderSetting(Map parameters) Deletes an order setting from the database.voideditOrderSetting(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, 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
-
BasicOrderSettingProcessor
public BasicOrderSettingProcessor()
-
-
Method Details
-
addOrderSetting
Description copied from interface:OrderSettingProcessorAdds 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:
addOrderSettingin interfaceOrderSettingProcessor- Parameters:
parameters- Map that should include the orderSetting fields including the orderID- Throws:
Exception
-
loadOrderSettingFromID
Description copied from interface:OrderSettingProcessorLoads a disconnected OrderSetting bean. This does not actually return the connected OrderSetting, but rather a copy- Specified by:
loadOrderSettingFromIDin interfaceOrderSettingProcessor- Returns:
- Throws:
Exception
-
loadOrderSettingObjectFromID
Description copied from interface:OrderSettingProcessorLoads a connected OrderSetting bean from the database.- Specified by:
loadOrderSettingObjectFromIDin interfaceOrderSettingProcessor- Returns:
- Throws:
Exception
-
editOrderSetting
Description copied from interface:OrderSettingProcessorUpdates 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:
editOrderSettingin interfaceOrderSettingProcessor- Throws:
Exception
-
deleteOrderSetting
Description copied from interface:OrderSettingProcessorDeletes 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:
deleteOrderSettingin interfaceOrderSettingProcessor- Throws:
Exception
-
findOrderSettingByCode
Description copied from interface:OrderSettingProcessorFind the order setting by code for a given order- Specified by:
findOrderSettingByCodein 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:OrderSettingProcessorAdds 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:
addOrUpdateOrderSettingin interfaceOrderSettingProcessor- Throws:
Exception
-