java.lang.Object | +--com.ibm.commerce.orderquotation.commands.QuotationUtility
Miscellaneous methods.
Constructor Summary | |
---|---|
QuotationUtility() |
Method Summary | |
---|---|
static java.lang.Integer |
calcBaseItemQuantity(java.lang.String theUOM,
java.lang.Double theQuantity,
BaseItemAccessBean theBaseItemAB) Calculates the base item quantity (with rounding DOWN). |
static java.lang.Integer |
calcBaseItemQuantityUp(java.lang.String theUOM,
java.lang.Double theQuantity,
BaseItemAccessBean theBaseItemAB) Calculates the base item quantity (with rounding UP). |
static QuantityAmount |
calcQuantityAmount(
OrderItemAccessBean theOrderItemAB,
CommandContext theCommandContext,
java.lang.Long theReferralInterfacePolicyId) Calculates the quantity amount. |
static
BaseItemAccessBean |
getBaseItemOf(
OrderItemAccessBean theOrderItemAB) Gets the base item access bean related to the order item access bean |
static java.lang.Long |
getDefaultContractReferralInterfacePolicyId(
CommandContext commandContext, java.lang.Integer anStoreId) Returns the policy Id of the ReferralInterface for the default Contract ID of the specified Store ID. |
static java.lang.Long |
getReferralInterfacePolicyIdFor(java.lang.Long theTradingAgreementId,
CommandContext commandContext) Sets the referral interface policy id based on the trading access bean for the quotation request. |
static java.lang.String |
mapUOM(java.lang.String theUOM,
CommandContext theCommandContext,
java.lang.Long theReferralInterfacePolicyId) Maps the unit of measure from the Websphere Commerce system to the external system. |
static java.lang.String |
mapUOMToWCUnit(java.lang.String theUOM,
CommandContext theCommandContext,
java.lang.Long theReferralInterfacePolicyId) Maps the unit of measure to the Websphere Commerce system from the external system. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait |
Constructor Detail |
---|
public QuotationUtility()
Method Detail |
---|
public static java.lang.Long getReferralInterfacePolicyIdFor(java.lang.Long theTradingAgreementId, CommandContext commandContext) throws ECException
theTradingAgreementId
- The contract id.commandContext
- The command context.
ECSystemException
- Raised with message _ERR_CREATE_EXCEPTION if
there is a javax.ejb.CreateException, _ERR_FINDER_EXCEPTION if there is a
javax.ejb.FinderException, _ERR_NAMING_EXCEPTION if there is a
javax.naming.NamingException, _ERR_REMOTE_EXCEPTION if there is a
java.rmi.RemoteException.ECException
public static BaseItemAccessBean getBaseItemOf(OrderItemAccessBean theOrderItemAB) throws ECException
theOrderItemAB
- The order item access bean.
ECSystemException
- Raised with message _ERR_CREATE_EXCEPTION if
there is a javax.ejb.CreateException, _ERR_FINDER_EXCEPTION if there is a
javax.ejb.FinderException, _ERR_NAMING_EXCEPTION if there is a
javax.naming.NamingException, _ERR_REMOTE_EXCEPTION if there is a
java.rmi.RemoteException.ECException
public static java.lang.String mapUOM(java.lang.String theUOM, CommandContext theCommandContext, java.lang.Long theReferralInterfacePolicyId) throws ECException
theUOM
- The unit of measure (in Websphere Commerce units) to
convert.theCommandContext
- The command context.theReferralInterfacePolicyId
- The referral interface policy
id.ECException
public static java.lang.String mapUOMToWCUnit(java.lang.String theUOM, CommandContext theCommandContext, java.lang.Long theReferralInterfacePolicyId) throws ECException
theUOM
- The unit of measure (in external units) to
convert.theCommandContext
- The command context.theReferralInterfacePolicyId
- The referral interface policy
id.ECException
public static QuantityAmount calcQuantityAmount(OrderItemAccessBean theOrderItemAB, CommandContext theCommandContext, java.lang.Long theReferralInterfacePolicyId) throws ECException
theOrderItemAB
- The order item access bean data.theCommandContext
- The command context.theReferralInterfacePolicyId
- The referral interface policy
id.
ECSystemException
- Raised with message _ERR_CREATE_EXCEPTION if
there is a javax.ejb.CreateException, _ERR_FINDER_EXCEPTION if there is a
javax.ejb.FinderException, _ERR_NAMING_EXCEPTION if there is a
javax.naming.NamingException, _ERR_REMOTE_EXCEPTION if there is a
java.rmi.RemoteException.ECException
public static java.lang.Integer calcBaseItemQuantityUp(java.lang.String theUOM, java.lang.Double theQuantity, BaseItemAccessBean theBaseItemAB) throws ECException
theUOM
- The unit of measure.theQuantity
- The quantity to use to calculate the base item
quantity.theBaseItemAB
- The base item access bean.ECException
- These exceptions are allowed to percolate.public static java.lang.Integer calcBaseItemQuantity(java.lang.String theUOM, java.lang.Double theQuantity, BaseItemAccessBean theBaseItemAB) throws ECException
theUOM
- The unit of measure.theQuantity
- The quantity to use to calculate the base item
quantity.theBaseItemAB
- The base item access bean.ECException
- These exceptions are allowed to percolate.public static java.lang.Long getDefaultContractReferralInterfacePolicyId(CommandContext commandContext, java.lang.Integer anStoreId) throws ECException
commandContext
- The command context.anStoreId
- the Store ID.ECException