public class CompositeGetContractUnitPriceCmdImpl extends AbstractGetPriceCmdImpl
The two implementations are called the "primary" command and the "secondary"
command. The expected default primary command implementation is
PriceRuleGetContractUnitPriceCmdImpl
, and the expected default
secondary command implementation is GetContractUnitPriceCmdImpl
.
Although this command is not hard-coded to call these two implementations,
the usePrimaryCommand(PriceInputCase)
method behaves as though the
primary command is PriceRuleGetContractUnitPriceCmdImpl
, and the
secondary command is any other implementation.
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.CompositeGetContractUnitPriceCmdImpl
|
com.ibm.commerce.price.commands.GetProductContractUnitPriceCmd |
com.ibm.commerce.price.commands.CompositeGetContractUnitPriceCmdImpl
|
com.ibm.commerce.price.commands.GetContractSpecialPriceCmd |
com.ibm.commerce.price.commands.CompositeGetContractUnitPriceCmdImpl
|
com.ibm.commerce.price.commands.GetContractUnitPriceCmd+AfterCompositePrimary
|
<Next Implementation of
com.ibm.commerce.price.commands.GetContractUnitPriceCmd > |
com.ibm.commerce.price.commands.GetProductContractUnitPriceCmd+AfterCompositePrimary
|
<Next Implementation of
com.ibm.commerce.price.commands.GetProductContractUnitPriceCmd
> |
com.ibm.commerce.price.commands.GetContractSpecialPriceCmd+AfterCompositePrimary
|
<Next Implementation of
com.ibm.commerce.price.commands.GetContractSpecialPriceCmd > |
com.ibm.commerce.price.commands.GetContractUnitPriceCmd+AfterCompositeSecondary
|
<Next Implementation of
com.ibm.commerce.price.commands.GetContractUnitPriceCmd > |
com.ibm.commerce.price.commands.GetProductContractUnitPriceCmd+AfterCompositeSecondary
|
<Next Implementation of
com.ibm.commerce.price.commands.GetProductContractUnitPriceCmd
> |
com.ibm.commerce.price.commands.GetContractSpecialPriceCmd+AfterCompositeSecondary
|
<Next Implementation of
com.ibm.commerce.price.commands.GetContractSpecialPriceCmd > |
Note that this command can be called by other price commands to form a chain.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SUFFIX_AFTER_COMPOSITE_PRIMARY
Suffix for {@link #executeNextInChain(GetPriceCmdInput, String) which is
called by this implementation for the primary command.
|
static java.lang.String |
SUFFIX_AFTER_COMPOSITE_SECONDARY
Suffix for {@link #executeNextInChain(GetPriceCmdInput, String) which is
called by this implementation for the secondary command.
|
NAME
defaultCommandClassName, NAME
NAME
Constructor and Description |
---|
CompositeGetContractUnitPriceCmdImpl() |
Modifier and Type | Method and Description |
---|---|
void |
performExecute()
Splits the input between the two implementations, executes them both,
then recombines them.
|
getApplicableTradingIds, getApplicableTradingUnitPrices, getBasePrice, getCatEntryPrices, getOffer, getOfferId, getPrice, getStoreId, getTcId, getTradingId, reset, 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 static final java.lang.String SUFFIX_AFTER_COMPOSITE_PRIMARY
public static final java.lang.String SUFFIX_AFTER_COMPOSITE_SECONDARY
public CompositeGetContractUnitPriceCmdImpl()
public void performExecute() throws com.ibm.commerce.exception.ECException
Splitting is done by calling usePrimaryCommand(PriceInputCase)
to decide which implementation gets what. Two commands are then both
executed by calling
#executeCommand(GetPriceCmdInput, String, PriceOutputCaseGetPriceCmdOutput)
with the suffix SUFFIX_AFTER_COMPOSITE_PRIMARY
and
SUFFIX_AFTER_COMPOSITE_SECONDARY
. Finally the output of the
commands are combined and the result is used as the output of this
command.
performExecute
in interface com.ibm.commerce.command.ECCommand
performExecute
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
- If there was an error when calling
usePrimaryCommand(PriceInputCase)
or when executing
either the primary or secondary command. This error will not
be thrown if AbstractGetPriceCmdImpl.setErrorMode(boolean)
was set to false.