Interface OrderSettingProcessor
- All Superinterfaces:
BusinessObject
,BusinessProcessor
- All Known Implementing Classes:
BasicOrderSettingProcessor
Interface for business logic methods having to do with order settings.
When the application needs to create an instance that implements
OrderSettingProcessor
,
BusinessObjectFactory
finds the name of the Java class to instantiate from the
"orderSettingProcessorImplementer" setting in the
appComponents.properties
file.
The default "orderSettingProcessorImplementer" is
OrderSettingProcessor
.
- Author:
- Jason McWilliams
-
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 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
-
addOrderSetting
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- Parameters:
parameters
- Map that should include the orderSetting fields including the orderID- Throws:
Exception
-
loadOrderSettingFromID
Loads a disconnected OrderSetting bean. This does not actually return the connected OrderSetting, but rather a copy- Parameters:
parameters
-- Returns:
- Throws:
Exception
-
loadOrderSettingObjectFromID
Loads a connected OrderSetting bean from the database.- Parameters:
parameters
-- Returns:
- Throws:
Exception
-
editOrderSetting
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- Parameters:
parameters
-- Throws:
Exception
-
deleteOrderSetting
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.- Parameters:
parameters
-- Throws:
Exception
-
findOrderSettingByCode
Find the order setting by code for a given order- Parameters:
order
- The Order under which the OrderSetting is foundcode
- The code of the OrderSetting- Throws:
Exception
-
addOrUpdateOrderSetting
void addOrUpdateOrderSetting(Order order, OrderSetting orderSetting, boolean commitOrder) throws Exception 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.- Parameters:
order
-orderSetting
-commitOrder
-- Throws:
Exception
-