public final class OrderItemsCmdHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int | PRICEREF_COMPLETE_REFRESH
The price refresh flag in the store table.
|
static int | PRICEREF_DEFAULT
The price refresh flag in the store table.
|
static int | PRICEREF_MERGE_BEFORE_CAL
The price refresh flag in the store table.
|
static int | PRICEREF_QUICK_COMPLETE_REFRESH
The price refresh flag in the store table.
|
static int | PRICEREF_QUICK_REFRESH
The price refresh flag in the store table.
|
Constructor and Description |
---|
OrderItemsCmdHelper()
OrderProcessingHelper constructor.
|
Modifier and Type | Method and Description |
---|---|
static java.sql.Timestamp | getEarliestShipTime(StoreAccessBean abStore)
This method gets the earliest ship time of a future order for a given store.
|
static java.lang.String[] | getEligibleTradingAgreements(CommandContext commandContext, java.lang.Long memberId)
Obtains a list of eligible trading agreements to be used.
|
static double | getInventoryOffsetInDays(java.lang.String storeId)
get the numeric value of the Inventory Allocation Offset in days for a given store
|
static java.lang.String | getPriceFromConfigurator(java.util.Hashtable ihshQuantity, java.util.Hashtable ihshDk_price, java.util.Hashtable ihshComp_quantity, java.util.Hashtable ihshComp_prices)
Get price from the BOM XML if price is locked from sterling configurator.
|
static OrderItemsCmdHelper | getUniqueInstance()
Get the unique instance of the OrderItemsCmdHelper object.
|
static void | handleKitPriceNotFoundException(OrderItemAccessBean abOrderItem, java.lang.String aClassName)
Handles the Kit price not found exception.
|
static void | insertOrderItemOffer(OrderItemAccessBean orderitemAB, java.lang.Long[] offerIds)
Saves the offers that were used for searching the price for an order item.
|
static void | insertOrderItemTrading(OrderItemAccessBean orderitemAB, java.lang.Long[] tradingIds)
Saves the trading agreements that were used for searching the price for an order item.
|
static boolean | isNonPriceLock(java.util.Hashtable ihash_dk_priceLock, java.util.Hashtable ihash_Comp_priceLocks)
Check whether the price is not locked by sterling configurator
|
static boolean | isPriceLock(java.util.Hashtable ihash_dk_priceLock, java.util.Hashtable ihash_Comp_priceLocks)
Check whether the price is locked by sterling configurator
|
static boolean | isPriceLock(java.lang.String[] comp_priceLocks)
Check whether the configuration is price locked.
|
static boolean | isTradingAgreementValid(java.lang.Long tradingId, java.lang.String[] eligibleTradingIds)
Verifies the input trading agreement against a list of eligible trading agreements.
|
static void | notifyBlocker(boolean toBlock, java.lang.Integer aStoreId, CommandContext aContext, java.lang.String aOrderId, java.lang.String aBlockReasonCode, java.lang.String aComment)
notify the order block manager of an override on an order Invokes NotifyBlockCmd.
|
static java.lang.Long[] | resolveTradingAgreements(CommandContext commandContext, OrderItemAccessBean orderitemAB, java.lang.Long[] tradingIds, int refreshFlag)
Verifies and resolves a list of eligible trading agreements for the user.
|
static java.lang.Long[] | retrieveOffers(OrderItemAccessBean anabOrderItem, int anRefreshFlag)
Retrieves previously searched offers for an order item based on the Price Refresh Flag (PRICEREFFLAGS) in STORE: 0: Default, same as 1 except that it will not save the offer id.
|
static java.lang.Long[] | retrieveOffers(OrderItemAccessBean orderitemAB, int refreshFlag, boolean retryFlag)
Retrieves previously searched offers for an order item based on the Price Refresh Flag (PRICEREFFLAGS) in STORE: 0: Default, same as 1 except that it will not save the offer id.
|
static java.lang.Long[] | retrieveSearchedAndSavedOffers(OrderItemAccessBean anabOrderItem)
Retrieves previously searched offers for an order item.
|
static java.lang.Long[] | retrieveSearchedAndSavedTradings(OrderItemAccessBean anabOrderItem, CommandContext aCommandContext)
Retrieves previously searched valid trading agreements for an order item.
|
static java.lang.Long[] | retrieveTradings(CommandContext aCommandContext, OrderItemAccessBean anabOrderItem, int anRefreshFlag)
This method calls the task command RetrieveTradingsTaskCmd to retrieve previously searched trading agreements for an orderitem based on the Price Refresh Flag (PRICEREFFLAGS) in STORE: 0: Default, same as 1 except that it will not save the trading agreement id.
|
static java.lang.Long[] | retrieveTradings(CommandContext commandContext, OrderItemAccessBean orderitemAB, int refreshFlag, boolean retryFlag)
Retrieves previously searched trading agreements for an order item based on the Price Refresh Flag (PRICEREFFLAGS) in STORE: 0: Default, same as 1 except that it will not save the trading agreement id.
|
static void | setInventoryOffsetInDays(java.lang.String storeId, double days)
set the Allocation Offset for a store by days
|
static java.lang.String | toString(java.lang.Long[] anArr) |
static void | updateContractId(OrderItemAccessBean orderitemAB, StoreAccessBean storeAB)
Saves the default contract id that provided the price for the order item (old support).
|
static void | updateOrderItemConfigurations(java.util.Vector ivOrderItems, CommandContext commandContext)
Updates order item configurations.
|
static void | updateTotalProductPrice(OrderItemAccessBean orderitemAB)
Update the total price for the order item.
|
static void | updateTradingId(OrderItemAccessBean orderitemAB, StoreAccessBean storeAB, java.lang.Long anTradingId)
Saves the trading agreement ids that provided the best price for the order item.
|
static int | validatePrice(java.lang.Integer aStoreId, CommandContext aContext, java.lang.String aCurrency, java.lang.Long aUserId, java.lang.Long aCatEntry, java.lang.String aPrice)
to validate if a price is valid by calling the ValidateDelegatedPriceCmd by CSR/TSR.
|
static void | verifyTradingIsStillValid(CommandContext theCommandContext, OrderItemAccessBean theOrderItemAB)
Verifies that the trading id of the order item is still valid.
|
static void | verifyTradingPaymentMethods(CommandContext commandContext, java.util.Enumeration enOrderItemABs)
Validate the trading agreements used by the order items in an order.
|
static java.lang.Long[] | verifyTradingPaymentMethods(CommandContext commandContext, OrderItemAccessBean orderitemAB, java.lang.Long[] tradingIds)
Verifies if the trading agreements used in the orderitem have defined compatible payment methods with those trading agreements used in the order.
|
public static final int PRICEREF_DEFAULT
public static final int PRICEREF_QUICK_REFRESH
public static final int PRICEREF_QUICK_COMPLETE_REFRESH
public static final int PRICEREF_COMPLETE_REFRESH
public static final int PRICEREF_MERGE_BEFORE_CAL
public OrderItemsCmdHelper()
public static java.lang.String[] getEligibleTradingAgreements(CommandContext commandContext, java.lang.Long memberId) throws ECException, javax.ejb.FinderException, javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException, java.sql.SQLException
The eligible list of trading agreements can be obtained directly from the Command Context. This case occurs if no member id is provided or the input member id is the one in Command Context. Else, they are retrieved by the member id if the id is provided and different from that in the Command Context.
public static OrderItemsCmdHelper getUniqueInstance()
public static void insertOrderItemOffer(OrderItemAccessBean orderitemAB, java.lang.Long[] offerIds) throws ECException, javax.ejb.FinderException, javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException, java.sql.SQLException
public static void insertOrderItemTrading(OrderItemAccessBean orderitemAB, java.lang.Long[] tradingIds) throws ECException, javax.ejb.FinderException, javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException, java.sql.SQLException
public static boolean isTradingAgreementValid(java.lang.Long tradingId, java.lang.String[] eligibleTradingIds) throws ECException
public static java.lang.Long[] resolveTradingAgreements(CommandContext commandContext, OrderItemAccessBean orderitemAB, java.lang.Long[] tradingIds, int refreshFlag) throws ECException, javax.ejb.FinderException, javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException, java.sql.SQLException
If trading agreements are specified, the input list will be verified against the eligible list before they will be used.
If the orderitem is newly created but no trading agreements are specified. The trading agreements can be obtained from the Command Context if the input member id is the one in Command Context. Or they can be retrieved by the member id (if it is provided and different from that in the Command Context). Existing order item will have the price refreshed according to the price refresh flag.
public static void verifyTradingIsStillValid(CommandContext theCommandContext, OrderItemAccessBean theOrderItemAB) throws ECException
public static java.lang.Long[] retrieveOffers(OrderItemAccessBean orderitemAB, int refreshFlag, boolean retryFlag) throws ECException, javax.ejb.FinderException, javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException, java.sql.SQLException
public static java.lang.Long[] retrieveOffers(OrderItemAccessBean anabOrderItem, int anRefreshFlag) throws javax.ejb.FinderException, javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException
public static java.lang.Long[] retrieveSearchedAndSavedOffers(OrderItemAccessBean anabOrderItem) throws javax.ejb.FinderException, javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException
public static java.lang.Long[] retrieveTradings(CommandContext aCommandContext, OrderItemAccessBean anabOrderItem, int anRefreshFlag) throws javax.ejb.FinderException, javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException, java.sql.SQLException, ECException
public static java.lang.Long[] retrieveSearchedAndSavedTradings(OrderItemAccessBean anabOrderItem, CommandContext aCommandContext) throws javax.ejb.FinderException, javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException, java.sql.SQLException, ECException
public static java.lang.String toString(java.lang.Long[] anArr)
public static java.lang.Long[] retrieveTradings(CommandContext commandContext, OrderItemAccessBean orderitemAB, int refreshFlag, boolean retryFlag) throws ECException, javax.ejb.FinderException, javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException, java.sql.SQLException
public static void updateContractId(OrderItemAccessBean orderitemAB, StoreAccessBean storeAB) throws ECException, javax.ejb.FinderException, javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException, java.sql.SQLException
public static void updateTotalProductPrice(OrderItemAccessBean orderitemAB) throws ECException, javax.ejb.FinderException, javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException, java.sql.SQLException
public static void updateTradingId(OrderItemAccessBean orderitemAB, StoreAccessBean storeAB, java.lang.Long anTradingId) throws javax.ejb.FinderException, javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException
public static java.lang.Long[] verifyTradingPaymentMethods(CommandContext commandContext, OrderItemAccessBean orderitemAB, java.lang.Long[] tradingIds) throws ECException
public static void verifyTradingPaymentMethods(CommandContext commandContext, java.util.Enumeration enOrderItemABs) throws ECException
public static java.sql.Timestamp getEarliestShipTime(StoreAccessBean abStore) throws ECException
public static double getInventoryOffsetInDays(java.lang.String storeId) throws ECException
public static void setInventoryOffsetInDays(java.lang.String storeId, double days) throws ECException
public static void notifyBlocker(boolean toBlock, java.lang.Integer aStoreId, CommandContext aContext, java.lang.String aOrderId, java.lang.String aBlockReasonCode, java.lang.String aComment) throws ECException
public static int validatePrice(java.lang.Integer aStoreId, CommandContext aContext, java.lang.String aCurrency, java.lang.Long aUserId, java.lang.Long aCatEntry, java.lang.String aPrice) throws ECException
public static void handleKitPriceNotFoundException(OrderItemAccessBean abOrderItem, java.lang.String aClassName) throws ECException, javax.ejb.FinderException, javax.ejb.CreateException, javax.naming.NamingException, java.rmi.RemoteException
public static boolean isPriceLock(java.util.Hashtable ihash_dk_priceLock, java.util.Hashtable ihash_Comp_priceLocks)
public static boolean isPriceLock(java.lang.String[] comp_priceLocks)
public static boolean isNonPriceLock(java.util.Hashtable ihash_dk_priceLock, java.util.Hashtable ihash_Comp_priceLocks)
public static java.lang.String getPriceFromConfigurator(java.util.Hashtable ihshQuantity, java.util.Hashtable ihshDk_price, java.util.Hashtable ihshComp_quantity, java.util.Hashtable ihshComp_prices)
public static void updateOrderItemConfigurations(java.util.Vector ivOrderItems, CommandContext commandContext) throws ECException