java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.command.BusinessPolicyCommandImpl | +--com.ibm.commerce.order.calculation.CalculationCmdImpl | +--com.ibm.commerce.order.calculation.ApplyShippingCmdImpl
The default implementation of
ApplyShippingCmd
.
Its behaviour is as follows:
ApplyCalculationUsageCmd
and its implementations,
ApplyStandardShippingChargeBySellerCmdImpl
and
ApplyShippingChargeByCarrierCmdImpl
).DiscountCalculationCodeCombineCmd
and its default
implementation,
DiscountCalculationCodeCombineCmdImpl
).Commands used:
Access beans used:OrderItemAccessBean
TradingAgreementAccessBean
TermConditionAccessBean
BusinessPolicyAccessBean
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT The IBM copyright string. |
Fields inherited from class com.ibm.commerce.command. BusinessPolicyCommandImpl |
policyId,
requestProperties |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.order.calculation. ApplyShippingCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
ApplyShippingCmdImpl() Contructor for ApplyShippingCmdImpl. |
Method Summary | |
---|---|
protected
void |
applyServiceDiscount(
ServiceDiscount aServiceDiscount) Applies a service discount. |
protected
void |
applyServiceDiscounts() Applies the service discounts generated by the discount calculation usage. |
protected
void |
callApplyCalculationUsage(java.lang.Long anPolicyId,
Item[] aItems) Invokes the business policy command implementation referenced by a business policy of type "ShippingCharge". |
void |
checkAppliedItems() Checks if a value has been calculated and applied to each and every item. |
java.util.Set |
getAppliedItems() Returns the items that have been applied to. |
protected
java.lang.Long |
getPolicyId(java.lang.Long anTradingId) Determines the business policy of type "ShippingCharge" associated with a contract. |
void |
performExecute() The business logic for this command. |
void |
reset() This method should be called after a command has been executed to reset its states variables. |
void |
setItems(
Item[] aItems) Sets the items. |
void |
setTaxCategoryIds(java.lang.Integer[] anTaxCategoryIds) Sets the tax categories that should be active during execution. |
Methods inherited from class com.ibm.commerce.order.calculation. CalculationCmdImpl |
createCommand,
getCurrency,
getCustomProperties,
getCustomProperty,
getTimestamp,
getUsageId,
setCurrency,
setCustomProperties,
setCustomProperty,
setTimestamp,
setUsageId |
Methods inherited from class com.ibm.commerce.command. BusinessPolicyCommandImpl |
getPolicyId,
getRequestProperties,
setPolicyId,
setRequestProperties |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties,
validateParameters |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Methods inherited from interface com.ibm.commerce.order.calculation. CalculationCmd |
getCurrency,
getCustomProperties,
getCustomProperty,
getTimestamp,
getUsageId,
setCurrency,
setCustomProperties,
setCustomProperty,
setTimestamp,
setUsageId |
Methods inherited from interface com.ibm.commerce.command. BusinessPolicyCommand |
getPolicyId,
getRequestProperties,
setPolicyId,
setRequestProperties |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public ApplyShippingCmdImpl()
Method Detail |
---|
protected void applyServiceDiscount(ServiceDiscount aServiceDiscount) throws ECException
DiscountCalculationCodeCombineCmd
and its default
implementation,
DiscountCalculationCodeCombineCmdImpl
.
aServiceDiscount
- the service discount.ECException
protected void applyServiceDiscounts() throws ECException
DiscountCalculationCodeCombineCmd
and its default
implementation,
DiscountCalculationCodeCombineCmdImpl
.
ECException
protected void callApplyCalculationUsage(java.lang.Long anPolicyId, Item[] aItems) throws ECException
performExecute()
. For more information, refer to the business
policy command interface
ApplyCalculationUsageCmd
and its implementations,
ApplyStandardShippingChargeBySellerCmdImpl
and
ApplyShippingChargeByCarrierCmdImpl
.
anPolicyId
- the business policy ID.ECException
public void checkAppliedItems() throws ECException
checkAppliedItems
in interface
ApplyCalculationUsageCmd
ECException
public java.util.Set getAppliedItems()
getAppliedItems
in interface
ApplyCalculationUsageCmd
Item
).protected java.lang.Long getPolicyId(java.lang.Long anTradingId) throws ECException
performExecute()
.
anTradingId
- the contract ID.ECException
public void performExecute() throws ECException
AbstractECTargetableCommand
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
ECCommand.performExecute()
public void reset()
AbstractECTargetableCommand
reset
in class
CalculationCmdImpl
com.ibm.websphere.command.Command#reset()
public void setItems(Item[] aItems)
setItems
in interface
ApplyCalculationUsageCmd
aItems
- the items.public void setTaxCategoryIds(java.lang.Integer[] anTaxCategoryIds)
setTaxCategoryIds
in interface
ApplyCalculationUsageCmd
anTaxCategoryIds
- the tax category IDs.