public class CalculateOrderCmdImpl extends TaskCommandImpl implements CalculateOrderCmd
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright notice field.
|
Constructor and Description |
---|
CalculateOrderCmdImpl()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void | addFreeGifts(java.util.Hashtable hshCatalogEntryIds, java.util.Hashtable hshQuantities, OrderAccessBean aabOrder)
This method is used to add new freegifts
|
protected java.util.Map | getCatalogEntryQuantitiesToAdd(OrderAccessBean aabOrder, java.util.HashMap ahshCustomProperties)
This method returns the CatalogEntries to add to the Order, and their quantities.
|
java.util.HashMap | getCustomProperties()
This method returns the customer properties.
|
protected java.util.Map | getFreebies(Adjustment[] adjustments)
This method returns the freebies in the specified adjustments.
|
java.util.Vector | getNonBuyableCatentryIds()
This method returns the identifiers of free gifts that are not buyable.
|
protected OrderItemAccessBean[] | getOrderItems(OrderAccessBean aabOrder)
This method returns the OrderItems of the specified Order.
|
OrderAccessBean[] | getOrders()
This method returns the array of OrderAccessBean
|
java.lang.Long[] | getOutOfInventoryCatalogEntryIds()
This method returns the CatalogEntry identifiers of free gifts that could not be added to the Order due to insufficient inventory.
|
protected java.util.Set | getOutOfInventoryCatalogEntryIds(java.util.Map mapCatalogEntryQuantitiesToAdd)
This method returns a Set of CatalogEntryIds that are out of inventory in the specified Map of freebies ( CatalogEntries/quantities )
|
protected boolean | getRemoveOutOfInventoryFreeGift()
Get the settings for if out-of-inventory free gifts should be removed from cart.
|
protected java.util.Date | getTime()
This method returns appropriate date.
|
protected void | handleFreeGift(OrderAccessBean iabOrder)
This method implements the free gift handling logic.
|
protected PromotionArgument | invokePromotionEngine(java.lang.String template, java.lang.Long orderId, boolean discardPreviousResult, boolean saveCurrentResult, java.util.Hashtable nameValuePair)
This method returns the PromotionArgument as a result of invoking the Promotions Engine.
|
void | performExecute()
Executes the main business logic of the command implementation.
|
protected void | removeFreeGifts(java.util.ArrayList orderItemsDel)
This method is used to remove the freegifts.
|
void | reset()
Resets instance variables to their initial values.
|
protected void | resolveATPParameters(TypedProperty reqParms, java.util.Hashtable orderItemIds)
This method is used to resolve ATP parameters.
|
void | setCustomProperties(java.util.HashMap newhshCustomProperties)
This method sets the customer properties.
|
void | setDoFreeGift(boolean doFreegift)
This method sets the flag whether free gift handling logic will be called.
|
void | setOrders(OrderAccessBean[] aabOrders)
This method sets the OrderAccessBean[]
|
protected void | setOutOfInventoryCatalogEntryIds(java.lang.Long[] anOutOfInventoryCatalogEntryIds)
This method sets the CatalogEntries that are out of inventory.
|
void | setUsageIds(java.lang.Integer[] anUsageIds)
This method sets the calculation usages will be used
|
protected void | updateFreeGiftsQuatities(java.util.Hashtable hshOrderItems_update, java.util.Hashtable hshQuantities_update, OrderAccessBean aabOrder)
This method is used to update the quantities of freegifts
|
public static final java.lang.String COPYRIGHT
public void reset()
public void performExecute() throws ECException
protected void handleFreeGift(OrderAccessBean iabOrder) throws ECException
public java.lang.Long[] getOutOfInventoryCatalogEntryIds()
public java.util.Vector getNonBuyableCatentryIds()
public java.util.HashMap getCustomProperties()
protected void setOutOfInventoryCatalogEntryIds(java.lang.Long[] anOutOfInventoryCatalogEntryIds)
public void setOrders(OrderAccessBean[] aabOrders)
public OrderAccessBean[] getOrders()
public void setUsageIds(java.lang.Integer[] anUsageIds)
public void setDoFreeGift(boolean doFreegift)
protected java.util.Map getCatalogEntryQuantitiesToAdd(OrderAccessBean aabOrder, java.util.HashMap ahshCustomProperties) throws ECException
protected java.util.Map getFreebies(Adjustment[] adjustments) throws ECSystemException
protected java.util.Set getOutOfInventoryCatalogEntryIds(java.util.Map mapCatalogEntryQuantitiesToAdd) throws ECException
protected PromotionArgument invokePromotionEngine(java.lang.String template, java.lang.Long orderId, boolean discardPreviousResult, boolean saveCurrentResult, java.util.Hashtable nameValuePair) throws ECException
protected java.util.Date getTime()
protected OrderItemAccessBean[] getOrderItems(OrderAccessBean aabOrder) throws ECException
protected void updateFreeGiftsQuatities(java.util.Hashtable hshOrderItems_update, java.util.Hashtable hshQuantities_update, OrderAccessBean aabOrder) throws ECException
protected void addFreeGifts(java.util.Hashtable hshCatalogEntryIds, java.util.Hashtable hshQuantities, OrderAccessBean aabOrder) throws ECException
protected void removeFreeGifts(java.util.ArrayList orderItemsDel) throws ECException
protected void resolveATPParameters(TypedProperty reqParms, java.util.Hashtable orderItemIds)
public void setCustomProperties(java.util.HashMap newhshCustomProperties)
protected boolean getRemoveOutOfInventoryFreeGift() throws ECException