public class EnsureOffersExistGetContractUnitPriceCmdImpl extends AbstractGetPriceCmdImpl
To use this command, register the interface name in the command registry similar to the example below.
Interface name | Command |
com.ibm.commerce.price.commands.GetContractUnitPriceCmd |
com.ibm.commerce.price.commands.EnsureOffersExistGetContractUnitPriceCmdImpl
|
com.ibm.commerce.price.commands.GetProductContractUnitPriceCmd |
com.ibm.commerce.price.commands.EnsureOffersExistGetContractUnitPriceCmdImpl
|
com.ibm.commerce.price.commands.GetContractSpecialPriceCmd |
com.ibm.commerce.price.commands.EnsureOffersExistGetContractUnitPriceCmdImpl
|
com.ibm.commerce.price.commands.GetContractUnitPriceCmd+AfterEnsureOffersExist
|
<Next Implementation of
com.ibm.commerce.price.commands.GetContractUnitPriceCmd > |
com.ibm.commerce.price.commands.GetProductContractUnitPriceCmd+AfterEnsureOffersExist
|
<Next Implementation of
com.ibm.commerce.price.commands.GetProductContractUnitPriceCmd
> |
com.ibm.commerce.price.commands.GetContractSpecialPriceCmd+AfterEnsureOffersExist
|
<Next Implementation of
com.ibm.commerce.price.commands.GetContractSpecialPriceCmd > |
Note that this command can be called by other price commands to form a chain.
This command implementation has the following steps:
PriceInputCase.createPriceCases(GetPriceCmdInput)
.
AbstractGetPriceCmdImpl.executeNextInChain(GetPriceCmdInput, String)
with a suffix of
"AfterEnsureOffersExist".
OfferAccessBeans
, a query will be performed to find any offer for the
corresponding catalog entry. If a price could not be found (a price is null),
an offer will not be added. This will be done for both single- and
batch-style return values.
NAME
defaultCommandClassName, NAME
NAME
Constructor and Description |
---|
EnsureOffersExistGetContractUnitPriceCmdImpl() |
Modifier and Type | Method and Description |
---|---|
MonetaryAmount |
getBestPriceForOfferWithSpecificCurrency(java.lang.String offerId,
java.lang.String currency,
java.lang.String storeId)
Get best price for an offer with specific currency, if the currency is
null, will return alternative prices.
|
com.ibm.commerce.order.objects.OfferAccessBean |
getOfferByPriceListAndCatentry(java.lang.String priceListIdStr,
java.lang.String catentryIdStr,
java.lang.String storeId,
java.lang.String currency,
java.lang.String uom,
java.lang.Double quantity,
java.util.Map runtimeParameters)
This method is used to get the offer for a catalog entry in a specific
price list.
|
boolean |
isValidOffer(java.lang.Double offerMinQuantity,
java.lang.Double offerMaxQuantity,
java.lang.String offerUOM,
QuantityAmount aQuantity,
java.lang.Long catentryID)
Filter the valid offer.
|
void |
performExecute()
Performs the steps described in the class description.
|
void |
reset()
Prepare this command for re-use.
|
getApplicableTradingIds, getApplicableTradingUnitPrices, getBasePrice, getCatEntryPrices, getOffer, getOfferId, getPrice, getStoreId, getTcId, getTradingId, setCatEntryId, setCatEntryPrices, setCurrency, setErrorMode, setMemberId, setOfferIds, setOrderItemAccessBean, setOrganizationId, setQuantity, setStoreId, setTradingIds, validateParameters
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public EnsureOffersExistGetContractUnitPriceCmdImpl()
public MonetaryAmount getBestPriceForOfferWithSpecificCurrency(java.lang.String offerId, java.lang.String currency, java.lang.String storeId)
offerId
- The offerId. If null or empty, will return null.currency
- The currency. If null or empty, will return null.storeId
- The storeId. If null or empty, will return null.public com.ibm.commerce.order.objects.OfferAccessBean getOfferByPriceListAndCatentry(java.lang.String priceListIdStr, java.lang.String catentryIdStr, java.lang.String storeId, java.lang.String currency, java.lang.String uom, java.lang.Double quantity, java.util.Map runtimeParameters) throws com.ibm.commerce.exception.ECException
priceListIdStr
- The price list ID.catentryIdStr
- The catalog entry ID.storeId
- The store ID.currency
- The currency.uom
- The unit of measurement.quantity
- The quantity.runtimeParameters
- The runtime parameters for rule, from which the pricing time
can be retrieved.com.ibm.commerce.exception.ECException
- If problems happens when retrieving offers from database.public boolean isValidOffer(java.lang.Double offerMinQuantity, java.lang.Double offerMaxQuantity, java.lang.String offerUOM, QuantityAmount aQuantity, java.lang.Long catentryID)
offerMinQuantity
- The minimum quantity. If null or empty, will return false.offerMaxQuantity
- The maximum quantity. If null or empty, will return false.offerUOM
- The UOM. If null or empty, will return false.aQuantity
- The quantity. If null or empty, will return false.catentryID
- The catalog entry id. This parameter can't be null or empty.public void performExecute() throws com.ibm.commerce.exception.ECException
performExecute
in interface com.ibm.commerce.command.ECCommand
performExecute
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
- If an error occurs while executing the next price command in
the chain, or while finding an appropriate missing offer.
This error will not be thrown if
AbstractGetPriceCmdImpl.setErrorMode(boolean)
was set to false.public void reset()
reset
in interface GetContractSpecialPriceCmd
reset
in interface GetContractUnitPriceCmd
reset
in interface GetProductContractUnitPriceCmd
reset
in class AbstractGetPriceCmdImpl
AbstractECTargetableCommand.reset()