public interface GetCustomContractUnitPriceCmd extends GetContractUnitPriceCmd, GetProductContractUnitPriceCmd, GetContractSpecialPriceCmd
There are two ways to specify the catalog entries for which prices should be calculated.
GetContractUnitPriceCmd.setCatEntryId(Long)
- Only one catalog entry's prices are to be
calculated. Using this method puts the command in "single catalog entry mode"
or simply, single mode.
GetContractUnitPriceCmd.setCatEntryPrices(CatEntryPrices[])
- Multiple catalog entries'
prices are to be calculated. Using this method puts the command in
"batch mode."
For each catalog entry specified, there may be multiple trading agreements used to calculate the price, and so the price for each of these trading agreements is returned. Among these prices, there is a "best" price which is returned as well. The best price is usually the lowest price among all trading agreements for a given catalog entry identifier, but this behavior can be customized.
The information related to price calculations for all catalog entries is
returned through the GetContractUnitPriceCmd.getCatEntryPrices()
method. This method will
return the correct information regardless of whether single mode or batch
mode is used. Each of the returned CatEntryPrices
objects contains
the relevant information for a single catalog entry. This interface also
provides methods to access the same information on the first catalog
entry for which prices were calculated. In other words, the first
CatEntryPrices
object in the array returned by
GetContractUnitPriceCmd.getCatEntryPrices()
can be accessed by using the methods on that
object, or by calling analogous get
methods on this command.
This is done mainly for backwards compatibility and compatibility with
similar interfaces (see below for similar interfaces).
The table below describes the mapping between methods of this command and
those of the first CatEntryPrices
returned by
getCatEntryPrices()
:
GetContractUnitPriceCmd method | CatEntryPrices method | Best or All Prices? |
---|---|---|
GetContractUnitPriceCmd.getTradingId() |
CatEntryPrices.getTradingId() |
Best |
GetContractUnitPriceCmd.getTcId() |
CatEntryPrices.getTcId() |
Best |
GetContractUnitPriceCmd.getOfferId() |
CatEntryPrices.getOfferId() |
Best |
GetContractUnitPriceCmd.getOffer() |
CatEntryPrices.getOffer() |
Best |
GetContractUnitPriceCmd.getBasePrice() |
CatEntryPrices.getBasePrice() |
Best |
GetContractUnitPriceCmd.getPrice() |
CatEntryPrices.getUnitPrice() |
Best |
GetContractUnitPriceCmd.getApplicableTradingIds() |
CatEntryPrices.getAllTradingIds() |
All |
Not applicable | CatEntryPrices.getTradingTcIds() |
All |
Not applicable | CatEntryPrices.getOfferIds() |
All |
Not applicable | CatEntryPrices#getOffers() |
All |
Not applicable | CatEntryPrices.getTradingBasePrices() |
All |
GetContractUnitPriceCmd.getApplicableTradingUnitPrices() |
CatEntryPrices.getTradingUnitPrices() |
All |
Note that the methods that return price information per trading agreement (those with the "all" designation) for a catalog entry also include the best price among them.
This command combines the semantics of GetContractUnitPriceCmd
,
GetContractSpecialPriceCmd
and GetProductContractUnitPriceCmd
. Where any ambiguity exists the semantics of
GetContractUnitPriceCmd
should be assumed.
To customize price calculations for catalog entries with custom data (in
particular, dynamic kits), register a class that implements this interface
(or a subclass of an existing class such as
PriceRuleGetContractUnitPriceCmdImpl
) in the command registry. The
calculations for the other commands will be unaffected.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
static java.lang.String |
defaultCommandClassName
The default implementation class.
|
static java.lang.String |
NAME
The name of this command.
|
Modifier and Type | Method and Description |
---|---|
void |
setCustomData(java.util.Map customData)
Set custom data that is passed to the command.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getApplicableTradingIds, getApplicableTradingUnitPrices, getBasePrice, getCatEntryPrices, getOffer, getOfferId, getPrice, getTcId, getTradingId, reset, setCatEntryId, setCatEntryPrices, setCurrency, setErrorMode, setMemberId, setOfferIds, setOrganizationId, setQuantity, setStoreId, setTradingIds
getApplicableTradingIds, getApplicableTradingUnitPrices, getBasePrice, getCatEntryPrices, getOffer, getOfferId, getPrice, getTcId, getTradingId, reset, setCatEntryId, setCurrency, setErrorMode, setOfferIds, setQuantity, setStoreId, setTradingIds
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, performExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
getApplicableTradingIds, getApplicableTradingUnitPrices, getBasePrice, getCatEntryPrices, getOffer, getOfferId, getPrice, getTcId, getTradingId, reset, setCatEntryId, setCatEntryPrices, setCurrency, setErrorMode, setOfferIds, setOrderItemAccessBean, setQuantity, setStoreId, setTradingIds
static final java.lang.String COPYRIGHT
static final java.lang.String defaultCommandClassName
static final java.lang.String NAME