public class PredefinedConfigurationComponentPricingCmdImpl extends com.ibm.commerce.command.TaskCommandImpl implements PredefinedConfigurationComponentPricingCmd
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName
Constructor and Description |
---|
PredefinedConfigurationComponentPricingCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.util.Set |
getAdditions(com.ibm.commerce.order.objects.OrderItemAccessBean oiab)
Returns all items that were added to the predefined configuration set on the
command in order to create the dynamic kit configuration represented by the
OrderItemAccessBean passed.
|
MonetaryAmount |
getPriceDifferenceAddingComponents(java.util.Set components,
java.lang.String currency,
java.lang.Long contractId)
Returns the negated price change to the predefined configuration that is
caused by removing the components in the passed Set of DynamicKitComponent
objects.
|
MonetaryAmount |
getPriceDifferenceRemovingComponents(java.util.Set components,
java.lang.String currency,
java.lang.Long contractId)
Returns the negated price change to the predefined configuration that is
caused by removing the components in the passed Set of DynamicKitComponent
objects.
|
MonetaryAmount |
getPriceDifferenceReplacingComponents(java.util.Hashtable replacements,
java.lang.String currency,
java.lang.Long contractId)
Returns the price change to the predefined configuration that is caused by
preforming the component replacements in the passed Hashtable of
DynamicKitComponent objects.
|
java.util.Set |
getRemovals(com.ibm.commerce.order.objects.OrderItemAccessBean oiab)
Returns all items that were removed from the predefined configuration set on
the command in order to create the dynamic kit configuration represented by
the OrderItemAccessBean passed.
|
java.util.Hashtable |
getReplacements(com.ibm.commerce.order.objects.OrderItemAccessBean oiab)
Returns a hashtable of the items, that were replaced in the predefined
configuration set on the command.
|
void |
performExecute()
Executes the command.
|
void |
setDynamicKitCatalogEntryId(java.lang.Long dynamicKitCatalogEntryId)
Sets the catalog entry ID of the dynamic kit.
|
void |
setPredefinedConfigurationId(java.lang.Long predefinedConfigurationId)
Sets the ID of the predefined configuration to use.
|
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, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
public static final java.lang.String COPYRIGHT
public PredefinedConfigurationComponentPricingCmdImpl()
public java.util.Set getAdditions(com.ibm.commerce.order.objects.OrderItemAccessBean oiab) throws com.ibm.commerce.exception.ECException
getAdditions
in interface PredefinedConfigurationComponentPricingCmd
oiab
- The OrderItemAccessBean that represents the dynamic kit
configuration to price using the predefined configuration set on the
command.com.ibm.commerce.exception.ECException
- Thrown whenever there is an error determining the additions
to the predefined configuration.OrderItemAccessBean
,
DynamicKitComponent
public MonetaryAmount getPriceDifferenceAddingComponents(java.util.Set components, java.lang.String currency, java.lang.Long contractId) throws java.lang.Exception
getPriceDifferenceAddingComponents
in interface PredefinedConfigurationComponentPricingCmd
components
- A Set of DynamicKitComponent objects that represents the
removals from the predefined configuration.currency
- The currency in which to calculate the price changes.contractId
- The ID of the contract to use to calculate the prices of
each component in the components Set.java.lang.Exception
- Thrown whenever the price change cannot be calculated.public MonetaryAmount getPriceDifferenceRemovingComponents(java.util.Set components, java.lang.String currency, java.lang.Long contractId) throws java.lang.Exception
getPriceDifferenceRemovingComponents
in interface PredefinedConfigurationComponentPricingCmd
components
- A Set of DynamicKitComponent objects that represents the
removals from the predefined configuration.currency
- The currency in which to calculate the price changes.contractId
- The ID of the contract to use to calculate the prices of
each component in the components Set.java.lang.Exception
- Thrown whenever the price change cannot be calculated.public MonetaryAmount getPriceDifferenceReplacingComponents(java.util.Hashtable replacements, java.lang.String currency, java.lang.Long contractId) throws java.lang.Exception
getPriceDifferenceReplacingComponents
in interface PredefinedConfigurationComponentPricingCmd
replacements
- A Hashtable of DynamicKitComponent objects that
represents the replacements in the predefined configuration.currency
- The currency in which to calculate the price changes.contractId
- The ID of the contract to use to calculate the prices of
each component in the components Set.java.lang.Exception
- Thrown whenever the price change cannot be calculated.public java.util.Set getRemovals(com.ibm.commerce.order.objects.OrderItemAccessBean oiab) throws com.ibm.commerce.exception.ECException
getRemovals
in interface PredefinedConfigurationComponentPricingCmd
oiab
- The OrderItemAccessBean that represents the dynamic kit configuration
to price using the predefined configuration set on the command.com.ibm.commerce.exception.ECException
- Thrown whenever there is an error determining the removals
from the predefined configuration.OrderItemAccessBean
,
DynamicKitComponent
public java.util.Hashtable getReplacements(com.ibm.commerce.order.objects.OrderItemAccessBean oiab) throws com.ibm.commerce.exception.ECException
getReplacements
in interface PredefinedConfigurationComponentPricingCmd
oiab
- The OrderItemAccessBean that represents the dynamic kit
configuration to price using the predefined configuration set on the
command.com.ibm.commerce.exception.ECException
- Thrown whenever there is an error determining the
replacements in the predefined configuration.OrderItemAccessBean
,
DynamicKitComponent
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
- Thrown whenever the predefined configuration cannot be loaded.public void setDynamicKitCatalogEntryId(java.lang.Long dynamicKitCatalogEntryId)
setDynamicKitCatalogEntryId
in interface PredefinedConfigurationComponentPricingCmd
dynamicKitCatalogEntryId
- The catalog entry ID of the dynamic kit.public void setPredefinedConfigurationId(java.lang.Long predefinedConfigurationId)
setPredefinedConfigurationId
in interface PredefinedConfigurationComponentPricingCmd
predefinedConfigurationId
- The ID of the predefined configuration to use.