public class CalculationHelper extends java.lang.Object implements CalculationConstants
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
The IBM copyright notice field.
|
Modifier | Constructor and Description |
---|---|
protected | CalculationHelper()
Constructor for CalculationHelper.
|
Modifier and Type | Method and Description |
---|---|
void | applyCalculationUsages(OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, CommandContext commandContext)
This method is called by OrderPrepare/PrepareOrder to apply all calculation usages enabled in the store.
|
void | applyCalculationUsages(OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, java.util.Set aEnabledUsageIds, java.util.Set aDisabledUsageIds, CommandContext commandContext)
This method is called by OrderPrepare/PrepareOrder to apply all calculation usages enabled in the store.
|
int | compare(java.lang.Comparable[] c1, java.lang.Comparable[] c2)
Compares two arrays of Comparables.
|
int | compare(java.lang.Comparable c1, java.lang.Comparable c2)
Compares two Comparables.
|
boolean | containsAny(java.lang.Object[] a1, java.lang.Object[] a2)
Returns whether the first array contains any element in the second array.
|
static java.math.BigDecimal | convert(java.math.BigDecimal value, StoreAccessBean storeAB, java.lang.String fromCurrency, java.lang.String toCurrency) |
java.math.BigDecimal | convertMonetaryValue(java.math.BigDecimal adValue1, java.lang.String astrCurrency1, java.lang.String astrCurrency2, CommandContext commandContext)
This method converts the monetary value from one currency to another using the forward conversion rate.
|
java.math.BigDecimal | convertMonetaryValueR(java.math.BigDecimal adValue1, java.lang.String astrCurrency1, java.lang.String astrCurrency2, CommandContext commandContext)
This method converts the monetary value from one currency to another using the backward conversion rate.
|
java.math.BigDecimal | convertQuantityValue(java.math.BigDecimal adValue1, java.lang.String astrUnit1, java.lang.String astrUnit2)
This method converts the quantity value from one unit to another.
|
void | correctZeroBoundaryCrossings(Item[] aItems, java.math.BigDecimal[] adAdjustments, java.lang.String astrCurrency, CommandContext commandContext)
This method is called by DiscountCalculationCodeApply to correct discounts that cross the zero boundary.
|
void | correctZeroBoundaryCrossings(Item[] aItems, java.math.BigDecimal[] adAdjustments, java.lang.String astrCurrency, CommandContext commandContext, java.util.List calUsgList)
This method corrects discounts that cross the zero boundary across multiple calculation usages.
|
protected boolean | correctZeroBoundaryCrossingsIteration(Item[] aItems, java.math.BigDecimal[] adAdjustments)
This method represents a single iteration in the "correct zero boundary crossing" algorithm.
|
protected boolean | correctZeroBoundaryCrossingsIteration(Item[] aItems, java.math.BigDecimal[] adAdjustments, java.util.Map oiAdjusts)
This method represents a single iteration in the "correct zero boundary crossing" algorithm.
|
static CalculationCmd | createCommand(CalculationMethodAccessBean aabMethod, CommandContext aCommandContext, java.util.HashMap amapCustomProperties, java.sql.Timestamp aTimestamp, java.lang.String astrCurrency, java.lang.Integer anUsageId)
Returns a calculation command corresponding to a calculation method.
|
java.math.BigDecimal[] | destructiveAdd(java.math.BigDecimal[] adValues1, java.math.BigDecimal[] adValues2)
Returns the sum of two BigDecimal arrays.
|
java.math.BigDecimal | divide(java.math.BigDecimal ad1, java.math.BigDecimal ad2)
Returns
|
void | finalizeCalculationUsages(OrderAccessBean aabOrder, OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, CommandContext commandContext)
This method is called by OrderProcess/ProcessOrder to apply all calculation usages enabled in the store.
|
void | finalizeCalculationUsages(OrderAccessBean aabOrder, OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, java.util.Set aEnabledUsageIds, java.util.Set aDisabledUsageIds, CommandContext commandContext)
This method is called by OrderProcess/ProcessOrder to apply all calculation usages enabled by the store.
|
int | findMax(java.math.BigDecimal[] e)
Returns the index of the largest value in a BigDecimal array.
|
int | findMin(java.math.BigDecimal[] e)
Returns the index of the smallest value in a BigDecimal array.
|
java.lang.Integer | getCodeId(java.lang.Integer anRuleId)
Returns the CalculationCode ID of the specified CalculationRule.
|
static java.util.Set | getEffectiveRuleIds(java.lang.Integer anCalculationCodeId, java.util.Map amapCustomProperties, CommandContext aCommandContext)
Gets the calculation rule ids of the currently effective CalculationRule access beans for a calculation code.
|
static CalculationRuleAccessBean[] | getEffectiveRules(java.lang.Integer anCalculationCodeId, java.util.Map amapCustomProperties, CommandContext aCommandContext)
Gets the currently effective CalculationRule access beans for a calculation code.
|
CalculationRuleAccessBean[] | getEffectiveRulesForShipping(java.lang.Integer aShipCalculationCodeId, java.lang.Integer aFulfillmentCenterId, java.lang.Long addressId, java.lang.Integer aShippingModeId, java.util.Map amapCustomProperties, CommandContext aCommandContext)
Get the effective shipping calculation rules for specified shipping calculation code Id, fulfillment center Id, ship to address Id.
|
CalculationRuleAccessBean[] | getEffectiveRulesForTax(java.lang.Integer aTaxCalculationCodeId, java.lang.Integer aFulfillmentCenterId, java.lang.Long aAddress, java.lang.Integer[] aTaxCategoryIds, java.util.Map amapCustomProperties, CommandContext aCommandContext)
Get the effective tax rules for specified tax calculation code Id, fulfillment center Id, address Id, and tax categories.
|
CalculationRuleAccessBean[] | getEffectiveRulesForTax(java.lang.Integer aTaxCalculationCodeId, java.lang.Integer aFulfillmentCenterId, java.lang.Long aAddressId, java.util.Map amapCustomProperties, CommandContext aCommandContext)
Get the effective tax rules for specified tax calculation code Id, fulfillment center Id, add address Id.
|
java.math.BigDecimal | getHistoryOrderTotalAmount(HistoryOrder anOrder, CommandContext aCommandContext)
This method gets the history order's total amount.
|
static boolean | getInMemoryAdjustmentFlag() |
static CalculationHelper | getInstance()
Returns an instance of this class.
|
java.math.BigDecimal | getOrderAdjustmentTotal(java.lang.Long anOrderId, java.lang.Integer anCalculationUsageId)
Returns the adjustment amount for specific order and
|
java.math.BigDecimal | getOrderItemAdjustmentTotal(java.lang.Long anOrderItemId, java.lang.Integer anCalculationUsageId)
Returns the adjustment amount for specific
|
java.math.BigDecimal | getOrderItemsTotalAmount(OrderItemAccessBean[] abOrderItems, CommandContext aCommandContext)
This method gets the order item array's total amount.
|
java.math.BigDecimal | getOrderItemTotalAmount(OrderItemAccessBean abOrderItem, CommandContext aCommandContext)
This method gets the order item's total amount.
|
java.math.BigDecimal | getOrderReleaseTotalAmount(OrderReleaseTotalsAccessBean[] abOrderReleaseTotals, CommandContext aCommandContext)
This method gets the order release total array's total amount.
|
java.math.BigDecimal | getOrderTotalAmount(OrderAccessBean abOrder, CommandContext aCommandContext)
This method gets the order's total amount.
|
java.lang.Long[] | getProductAndItemIds(java.lang.Long anCatalogEntryId)
Returns the parent product of an item and the item itself.
|
java.lang.Long[] | getProductOrItemIds(java.lang.Long anCatalogEntryId)
Returns the parent product of an item.
|
static java.util.HashMap | getPromotionDetailsByCalcodeID(java.lang.Integer calculationCodeID)
Returns the details of a promotion based on the passed calculation code ID.
|
java.math.BigDecimal | getQuantity(java.lang.Long anCatalogEntryId, java.math.BigDecimal adNormalizedQuantity, java.lang.String astrUnit)
Returns the quantity value represented by the specified normalized quantity.
|
java.math.BigDecimal | getRoundingMultiple(java.lang.String astrCurrency, CommandContext commandContext)
Returns the rounding multiple of the specified currency.
|
java.math.BigDecimal | getRoundingMultiple(java.lang.String astrCurrency, java.lang.String astrNumberUsage, CommandContext commandContext)
Returns the rounding multiple of the specified currency.
|
int | getRoundMethod(java.lang.String astrCurrency, java.lang.String astrNumberUsage, CommandContext commandContext)
Returns the rounding method of the specified currency.
|
java.lang.Integer[] | getShippingJurisdictionsByAddress(java.lang.Long anAddressId, CommandContext commandContext, java.util.Map amapCustomProperties)
Get the shipping jurisdictions by shipping Address
|
java.lang.Integer | getStoreGroupId(java.lang.Integer anStoreId)
Returns the StoreGroup ID of the specified Store.
|
java.lang.Integer[] | getStorePath(java.lang.Integer anStoreId, java.lang.String anStoreRelationShipTypeId)
Returns the Store ID array in the
|
java.math.BigDecimal | getTaxableAdjustmentTotal(java.lang.Long anOrderItemId, java.lang.Integer anTaxCategoryId)
Returns the taxable adjustment total of the specified OrderItem and TaxCategory.
|
java.util.Map | getTaxableAdjustmentTotals(Item[] aItems, java.lang.Integer anTaxCategoryId, java.util.HashMap ahshCustomProperties)
Returns the taxable adjustment total of the specified Items and TaxCategory.
|
java.util.Map | getTaxableAdjustmentTotals(Item[] aItems, java.lang.Integer anTaxCategoryId, java.util.HashMap ahshCustomProperties, java.util.Set asetTaxExemptedAdjustmentUsageIds)
Returns the taxable adjustment total of the specified Items and TaxCategory.
|
java.lang.Integer[] | getTaxCategoryIds(StoreAccessBean aabStore, java.lang.Integer anUsageId)
Returns the tax categories of a particular calculation usage: Calculation Usage Tax Categories sales tax all sales tax categories shipping tax all shipping tax categories other null
|
java.lang.Integer[] | getTaxJurisdictionsByAddress(java.lang.Long anAddressId, CommandContext commandContext, java.util.Map amapCustomProperties)
Get the tax jurisdictions by shipping Address
|
java.util.Hashtable | getTSRShippingAdjustmentRoleLimits(java.lang.Long aTSRId, java.lang.Integer aStoreId)
This method returns a hash table of TSR shipping adjustment role limits.
|
java.math.BigDecimal | getWeight(java.lang.Long anCatalogEntryId, java.math.BigDecimal adNormalizedQuantity, java.lang.String astrUnit)
Returns the weight value represented by the specified normalized quantity.
|
void | initializeCalculationUsages(OrderAccessBean aabOrder, OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, CommandContext commandContext)
This method is called by OrderPrepare/PrepareOrder to initialize all calculation usages enabled by the store.
|
void | initializeCalculationUsages(OrderAccessBean aabOrder, OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, java.util.Set aEnabledUsageIds, java.util.Set aDisabledUsageIds, CommandContext commandContext)
This method is called by OrderPrepare/PrepareOrder to initialize all calculation usages enabled by the store.
|
static java.lang.Integer[] | intersectTaxCategoryIdsByOrder(java.lang.Long nOrderId, java.lang.Integer[] nTaxCategoryIds)
Get the tax category Ids from ORDTAX table for an order, and intersect the Ids with the passed-in list of tax category Ids.
|
boolean | isCurrentUserInMemberGroup(java.lang.Long anMemberGroupId, CommandContext commandContext)
This method checks whether the current user is in the member group.
|
boolean | isEffective(CalculationCodeAccessBean aabCode, java.sql.Timestamp aTimestamp)
Returns whether a CalculationCode is effective at the specified time.
|
boolean | isEffective(CalculationRuleAccessBean aabRule, java.sql.Timestamp aTimestamp)
Returns whether a CalculationRule is effective at the specified time.
|
boolean | isPublished(CalculationCodeAccessBean aabCode)
Returns whether a CalculationCode is published.
|
boolean | isSubOrderSupported()
Return if the sub order is supported, it is configured in instance xml.
|
CalculationCodeAccessBean[] | merge(CalculationCodeAccessBean[] aabCodes1, CalculationCodeAccessBean[] aabCodes2)
Merges two CalculationCode arrays into a single array with no duplicate element.
|
static void | recycleCommand(CalculationCmd aCalculationCmd, CalculationMethodAccessBean aabMethod, CommandContext aCommandContext, java.util.HashMap amapCustomProperties)
Saves a command created using the createCommand method.
|
java.math.BigDecimal[] | remapValues(Item[] aItems1, java.math.BigDecimal[] adValues1, Item[] aItems2)
Returns a BigDecimal array adValues2 such that, if aItems1[i] == aItems2[j], then adValues1[i] == adValues2[j].
|
void | round(java.math.BigDecimal[] a, java.lang.String astrCurrency, CommandContext commandContext)
Rounds a BigDecimal array using the "fudging" algorithm.
|
void | round(java.math.BigDecimal[] a, java.lang.String astrCurrency, java.lang.String astrNumberUsage, CommandContext commandContext)
Rounds a BigDecimal array using the "fudging" algorithm.
|
java.math.BigDecimal | round(java.math.BigDecimal adValue, java.lang.String astrCurrency, CommandContext commandContext)
Rounds a monetary value in the specified currency.
|
java.math.BigDecimal | round(java.math.BigDecimal adValue, java.lang.String astrCurrency, java.lang.String astrNumberUsage, CommandContext commandContext)
Rounds a monetary value in the specified currency.
|
java.math.BigDecimal[] | spread(java.math.BigDecimal adValue, java.math.BigDecimal[] adWeights)
Spreads a value using the specified mathematical weights.
|
java.math.BigDecimal | sum(java.math.BigDecimal[] adValues)
Sums the elements of a BigDecimal array.
|
void | summarizeCalculationUsages(OrderAccessBean aabOrder, SubOrderAccessBean[] aabSubOrders, OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, CommandContext commandContext)
This method is called by OrderPrepare/PrepareOrder to summarize all calculation usages enabled by the store.
|
void | summarizeCalculationUsages(OrderAccessBean aabOrder, SubOrderAccessBean[] aabSubOrders, OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, java.util.Set aEnabledUsageIds, java.util.Set aDisabledUsageIds, CommandContext commandContext)
This method is called by OrderPrepare/PrepareOrder to summarize all calculation usages enabled by the store.
|
static java.lang.Object[] | toArray(java.util.Enumeration anEnum, java.lang.Class aClass) |
static java.lang.Object[] | toArray(java.util.Vector vector, java.lang.Class aClass) |
java.lang.String | toString(java.lang.Object[] a)
Returns the string representation of the specified array.
|
static java.util.Vector | toVector(java.util.Enumeration anEnum) |
SubOrderAccessBean[] | updateSubOrders(java.lang.Long anOrderId, OrderItemAccessBean[] aabOrderItems)
Deprecated.
|
SubOrderAccessBean[] | updateSubOrders(java.lang.Long anOrderId, OrderItemAccessBean[] aabOrderItems, CommandContext aCommandContext)
This method is called by OrderPrepare/PrepareOrder to update the suborder totals of an order.
|
public static final java.lang.String COPYRIGHT
protected CalculationHelper()
public static boolean getInMemoryAdjustmentFlag()
public void applyCalculationUsages(OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, CommandContext commandContext) throws ECException
public int compare(java.lang.Comparable[] c1, java.lang.Comparable[] c2)
c1is null, return -1
c2is null, return 1
public int compare(java.lang.Comparable c1, java.lang.Comparable c2)
public boolean containsAny(java.lang.Object[] a1, java.lang.Object[] a2)
public static java.math.BigDecimal convert(java.math.BigDecimal value, StoreAccessBean storeAB, java.lang.String fromCurrency, java.lang.String toCurrency) throws ECException
public java.math.BigDecimal convertMonetaryValue(java.math.BigDecimal adValue1, java.lang.String astrCurrency1, java.lang.String astrCurrency2, CommandContext commandContext) throws ECException
public java.math.BigDecimal convertMonetaryValueR(java.math.BigDecimal adValue1, java.lang.String astrCurrency1, java.lang.String astrCurrency2, CommandContext commandContext) throws ECException
public java.math.BigDecimal convertQuantityValue(java.math.BigDecimal adValue1, java.lang.String astrUnit1, java.lang.String astrUnit2) throws ECException
public void correctZeroBoundaryCrossings(Item[] aItems, java.math.BigDecimal[] adAdjustments, java.lang.String astrCurrency, CommandContext commandContext) throws ECException
public void correctZeroBoundaryCrossings(Item[] aItems, java.math.BigDecimal[] adAdjustments, java.lang.String astrCurrency, CommandContext commandContext, java.util.List calUsgList) throws ECException
protected boolean correctZeroBoundaryCrossingsIteration(Item[] aItems, java.math.BigDecimal[] adAdjustments) throws ECException
protected boolean correctZeroBoundaryCrossingsIteration(Item[] aItems, java.math.BigDecimal[] adAdjustments, java.util.Map oiAdjusts) throws ECException
public java.math.BigDecimal[] destructiveAdd(java.math.BigDecimal[] adValues1, java.math.BigDecimal[] adValues2)
public java.math.BigDecimal divide(java.math.BigDecimal ad1, java.math.BigDecimal ad2)
ad1.divide(ad2, 20, BigDecimal.ROUND_HALF_UP).
ad1.divide(ad2, 20, BigDecimal.ROUND_HALF_UP).
public void finalizeCalculationUsages(OrderAccessBean aabOrder, OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, CommandContext commandContext) throws ECException
public int findMax(java.math.BigDecimal[] e)
public int findMin(java.math.BigDecimal[] e)
public java.lang.Integer getCodeId(java.lang.Integer anRuleId) throws ECException
public static CalculationHelper getInstance()
public java.lang.Long[] getProductAndItemIds(java.lang.Long anCatalogEntryId) throws ECException
public java.lang.Long[] getProductOrItemIds(java.lang.Long anCatalogEntryId) throws ECException
public java.math.BigDecimal getQuantity(java.lang.Long anCatalogEntryId, java.math.BigDecimal adNormalizedQuantity, java.lang.String astrUnit) throws ECException
public java.math.BigDecimal getRoundingMultiple(java.lang.String astrCurrency, CommandContext commandContext) throws ECException
public java.lang.Integer getStoreGroupId(java.lang.Integer anStoreId) throws ECException
public java.lang.Integer[] getStorePath(java.lang.Integer anStoreId, java.lang.String anStoreRelationShipTypeId) throws ECException
storepathof the specified Store.
public java.math.BigDecimal getTaxableAdjustmentTotal(java.lang.Long anOrderItemId, java.lang.Integer anTaxCategoryId) throws ECException
public java.math.BigDecimal getOrderItemAdjustmentTotal(java.lang.Long anOrderItemId, java.lang.Integer anCalculationUsageId) throws ECException
orderitemand
calculationusage.
public java.math.BigDecimal getOrderAdjustmentTotal(java.lang.Long anOrderId, java.lang.Integer anCalculationUsageId) throws ECException
calculationusage.
public java.lang.Integer[] getTaxCategoryIds(StoreAccessBean aabStore, java.lang.Integer anUsageId) throws ECException
Calculation Usage | Tax Categories |
---|---|
sales tax | all sales tax categories |
shipping tax | all shipping tax categories |
other | null |
public java.math.BigDecimal getWeight(java.lang.Long anCatalogEntryId, java.math.BigDecimal adNormalizedQuantity, java.lang.String astrUnit) throws ECException
public void initializeCalculationUsages(OrderAccessBean aabOrder, OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, CommandContext commandContext) throws ECException
public boolean isCurrentUserInMemberGroup(java.lang.Long anMemberGroupId, CommandContext commandContext) throws ECException
public boolean isEffective(CalculationCodeAccessBean aabCode, java.sql.Timestamp aTimestamp) throws ECException
public boolean isEffective(CalculationRuleAccessBean aabRule, java.sql.Timestamp aTimestamp) throws ECException
public boolean isPublished(CalculationCodeAccessBean aabCode) throws ECException
public CalculationCodeAccessBean[] merge(CalculationCodeAccessBean[] aabCodes1, CalculationCodeAccessBean[] aabCodes2) throws ECException
public java.math.BigDecimal[] remapValues(Item[] aItems1, java.math.BigDecimal[] adValues1, Item[] aItems2)
public void round(java.math.BigDecimal[] a, java.lang.String astrCurrency, CommandContext commandContext) throws ECException
public java.math.BigDecimal round(java.math.BigDecimal adValue, java.lang.String astrCurrency, CommandContext commandContext) throws ECException
public java.math.BigDecimal[] spread(java.math.BigDecimal adValue, java.math.BigDecimal[] adWeights) throws ECException
public java.math.BigDecimal sum(java.math.BigDecimal[] adValues)
public void summarizeCalculationUsages(OrderAccessBean aabOrder, SubOrderAccessBean[] aabSubOrders, OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, CommandContext commandContext) throws ECException
public java.lang.String toString(java.lang.Object[] a)
public static java.lang.Object[] toArray(java.util.Enumeration anEnum, java.lang.Class aClass)
public static java.lang.Object[] toArray(java.util.Vector vector, java.lang.Class aClass)
public static java.util.Vector toVector(java.util.Enumeration anEnum)
public SubOrderAccessBean[] updateSubOrders(java.lang.Long anOrderId, OrderItemAccessBean[] aabOrderItems, CommandContext aCommandContext) throws ECException
public SubOrderAccessBean[] updateSubOrders(java.lang.Long anOrderId, OrderItemAccessBean[] aabOrderItems) throws ECException
public void applyCalculationUsages(OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, java.util.Set aEnabledUsageIds, java.util.Set aDisabledUsageIds, CommandContext commandContext) throws ECException
public void finalizeCalculationUsages(OrderAccessBean aabOrder, OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, java.util.Set aEnabledUsageIds, java.util.Set aDisabledUsageIds, CommandContext commandContext) throws ECException
public void initializeCalculationUsages(OrderAccessBean aabOrder, OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, java.util.Set aEnabledUsageIds, java.util.Set aDisabledUsageIds, CommandContext commandContext) throws ECException
public void summarizeCalculationUsages(OrderAccessBean aabOrder, SubOrderAccessBean[] aabSubOrders, OrderItemAccessBean[] aabOrderItems, java.lang.String astrCurrency, java.util.HashMap ahshCustomProperties, java.util.Set aEnabledUsageIds, java.util.Set aDisabledUsageIds, CommandContext commandContext) throws ECException
public java.math.BigDecimal getRoundingMultiple(java.lang.String astrCurrency, java.lang.String astrNumberUsage, CommandContext commandContext) throws ECException
public int getRoundMethod(java.lang.String astrCurrency, java.lang.String astrNumberUsage, CommandContext commandContext) throws ECException
public void round(java.math.BigDecimal[] a, java.lang.String astrCurrency, java.lang.String astrNumberUsage, CommandContext commandContext) throws ECException
public java.math.BigDecimal round(java.math.BigDecimal adValue, java.lang.String astrCurrency, java.lang.String astrNumberUsage, CommandContext commandContext) throws ECException
public java.util.Map getTaxableAdjustmentTotals(Item[] aItems, java.lang.Integer anTaxCategoryId, java.util.HashMap ahshCustomProperties) throws ECException
public java.util.Map getTaxableAdjustmentTotals(Item[] aItems, java.lang.Integer anTaxCategoryId, java.util.HashMap ahshCustomProperties, java.util.Set asetTaxExemptedAdjustmentUsageIds) throws ECException
public java.util.Hashtable getTSRShippingAdjustmentRoleLimits(java.lang.Long aTSRId, java.lang.Integer aStoreId) throws ECException
public static final CalculationRuleAccessBean[] getEffectiveRules(java.lang.Integer anCalculationCodeId, java.util.Map amapCustomProperties, CommandContext aCommandContext) throws ECException
public java.lang.Integer[] getTaxJurisdictionsByAddress(java.lang.Long anAddressId, CommandContext commandContext, java.util.Map amapCustomProperties) throws ECException
public java.lang.Integer[] getShippingJurisdictionsByAddress(java.lang.Long anAddressId, CommandContext commandContext, java.util.Map amapCustomProperties) throws ECException
public CalculationRuleAccessBean[] getEffectiveRulesForShipping(java.lang.Integer aShipCalculationCodeId, java.lang.Integer aFulfillmentCenterId, java.lang.Long addressId, java.lang.Integer aShippingModeId, java.util.Map amapCustomProperties, CommandContext aCommandContext) throws ECException
public CalculationRuleAccessBean[] getEffectiveRulesForTax(java.lang.Integer aTaxCalculationCodeId, java.lang.Integer aFulfillmentCenterId, java.lang.Long aAddress, java.lang.Integer[] aTaxCategoryIds, java.util.Map amapCustomProperties, CommandContext aCommandContext) throws ECException
public CalculationRuleAccessBean[] getEffectiveRulesForTax(java.lang.Integer aTaxCalculationCodeId, java.lang.Integer aFulfillmentCenterId, java.lang.Long aAddressId, java.util.Map amapCustomProperties, CommandContext aCommandContext) throws ECException
public static final java.util.Set getEffectiveRuleIds(java.lang.Integer anCalculationCodeId, java.util.Map amapCustomProperties, CommandContext aCommandContext) throws ECException
public static final CalculationCmd createCommand(CalculationMethodAccessBean aabMethod, CommandContext aCommandContext, java.util.HashMap amapCustomProperties, java.sql.Timestamp aTimestamp, java.lang.String astrCurrency, java.lang.Integer anUsageId) throws ECException
public static final void recycleCommand(CalculationCmd aCalculationCmd, CalculationMethodAccessBean aabMethod, CommandContext aCommandContext, java.util.HashMap amapCustomProperties) throws ECException
public boolean isSubOrderSupported()
<Order/SubOrderSupported="false"/>or
<Order/SubOrderSupported="false"/>
public java.math.BigDecimal getOrderTotalAmount(OrderAccessBean abOrder, CommandContext aCommandContext) throws ECException
public java.math.BigDecimal getHistoryOrderTotalAmount(HistoryOrder anOrder, CommandContext aCommandContext) throws ECException
public java.math.BigDecimal getOrderItemTotalAmount(OrderItemAccessBean abOrderItem, CommandContext aCommandContext) throws ECException
public java.math.BigDecimal getOrderItemsTotalAmount(OrderItemAccessBean[] abOrderItems, CommandContext aCommandContext) throws ECException
public java.math.BigDecimal getOrderReleaseTotalAmount(OrderReleaseTotalsAccessBean[] abOrderReleaseTotals, CommandContext aCommandContext) throws ECException
public static java.util.HashMap getPromotionDetailsByCalcodeID(java.lang.Integer calculationCodeID) throws ECException
1. isCodeRequired - boolean value to indicate if the promotion requires a promotion code.
2. promotionType - the promotion type.
public static java.lang.Integer[] intersectTaxCategoryIdsByOrder(java.lang.Long nOrderId, java.lang.Integer[] nTaxCategoryIds) throws java.rmi.RemoteException, javax.naming.NamingException, javax.ejb.FinderException, javax.ejb.CreateException