com.ibm.commerce.order.calculation
Class ApplyShippingCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- 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
-
- All Implemented Interfaces:
- BusinessPolicyCommand, com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, ApplyCalculationUsageCmd, ApplyShippingCmd, CalculationCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
public class ApplyShippingCmdImpl extends CalculationCmdImpl implements ApplyShippingCmd
This is the default implementation of
ApplyShippingCmd
.Its behaviour is as follows:
-
for each item:
- determines the contract it references.
- determines ShippingTCShippingCharge of the contract.
- determines business policy of type "ShippingCharge" referenced by the ShippingTCShippingCharge.
- groups items sharing the same business policy.
- for each business policy, invokes the business policy command implementation
it references (see the business policy command interface
ApplyCalculationUsageCmd
and its implementations,ApplyStandardShippingChargeBySellerCmdImpl
andApplyShippingChargeByCarrierCmdImpl
).
Commands used:
Access beans used:- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
COPYRIGHT
The IBM copyright notice field.-
Fields inherited from interface com.ibm.commerce.order.calculation.ApplyShippingCmd
defaultCommandClassName, NAME
-
-
Constructor Summary
Constructors Constructor and Description ApplyShippingCmdImpl()
Constructor for ApplyShippingCmdImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
checkAppliedItems()
Checks if a value has been calculated and applied to each and every item.java.util.Set
getAppliedItems()
This method returns the items that have been applied to.void
performExecute()
Executes the business logic of this command implementation.void
reset()
This method resets the variables of the command.void
setItems(Item[] aItems)
This method sets the items.void
setTaxCategoryIds(java.lang.Integer[] anTaxCategoryIds)
This method sets the tax categories that should be active during execution.-
Methods inherited from class com.ibm.commerce.order.calculation.CalculationCmdImpl
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, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
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
-
Methods inherited from interface com.ibm.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
-
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
The IBM copyright notice field.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ApplyShippingCmdImpl
public ApplyShippingCmdImpl()
Constructor for ApplyShippingCmdImpl.
-
-
Method Detail
-
checkAppliedItems
public void checkAppliedItems() throws ECException
Checks if a value has been calculated and applied to each and every item. If not, an ECApplicationException with ECMessage _ERR_CALCODE will be thrown.- Specified by:
checkAppliedItems
in interfaceApplyCalculationUsageCmd
- Throws:
ECException
-
getAppliedItems
public java.util.Set getAppliedItems()
This method returns the items that have been applied to.- Specified by:
getAppliedItems
in interfaceApplyCalculationUsageCmd
- Returns:
- the items (class:
Item
).
-
performExecute
public void performExecute() throws ECException
Executes the business logic of this command implementation.- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- Throws:
ECException
- See Also:
ECCommand.performExecute()
-
reset
public void reset()
This method resets the variables of the command.- Specified by:
reset
in interfacecom.ibm.websphere.command.Command
- Overrides:
reset
in classCalculationCmdImpl
- See Also:
Command.reset()
-
setItems
public void setItems(Item[] aItems)
This method sets the items.- Specified by:
setItems
in interfaceApplyCalculationUsageCmd
- Parameters:
aItems
- the items.
-
setTaxCategoryIds
public void setTaxCategoryIds(java.lang.Integer[] anTaxCategoryIds)
This method sets the tax categories that should be active during execution. Normally that would be all sales/shipping tax categories defined in the current store. For sales/shipping tax only.- Specified by:
setTaxCategoryIds
in interfaceApplyCalculationUsageCmd
- Parameters:
anTaxCategoryIds
- the tax category IDs.
-
-