com.ibm.commerce.order.calculation
Class ApplyShippingChargeByCarrierCmdImpl
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.ApplyShippingChargeByCarrierCmdImpl
- All Implemented Interfaces:
- ApplyCalculationUsageCmd, BusinessPolicyCommand, CalculationCmd, ECCommand, ECTargetableCommand, TaskCommand
- public class ApplyShippingChargeByCarrierCmdImpl
- extends CalculationCmdImpl
- implements ApplyCalculationUsageCmd
An implementation of ApplyCalculationUsageCmd for the bootstrap business policy "ShippingChargeByCarrier".
Its behaviour is as follows:
- for each item:
- sets its "shipping to be charged by carrier" flag (see ORDERITEMS.PREPAREFLAGS).
- sets its shipping charge to 0.
Commands used:
Access beans used:
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
COPYRIGHT
The IBM copyright notice field. |
Method Summary |
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. |
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, recycleCommand, setCurrency, setCustomProperties, setCustomProperty, setTimestamp, setUsageId |
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 |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- The IBM copyright notice field.
- See Also:
- Constant Field Values
ApplyShippingChargeByCarrierCmdImpl
public ApplyShippingChargeByCarrierCmdImpl()
- Contructor for ApplyShippingChargeByCarrierCmdImpl.
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 interface ApplyCalculationUsageCmd
-
- Throws:
- ECException
getAppliedItems
public java.util.Set getAppliedItems()
- Returns the items that have been applied to.
-
- Specified by:
- getAppliedItems in interface ApplyCalculationUsageCmd
-
- Returns:
- the items (class: Item).
performExecute
public void performExecute()
throws ECException
- Description copied from class: AbstractECTargetableCommand
- The business logic for this command. This method should be overwritten by all command writers. Command writers should call super.performExecute() as the first line in their method.
-
- Specified by:
- performExecute in interface ECCommand
- Overrides:
- performExecute in class AbstractECTargetableCommand
-
- Throws:
- ECException
- See Also:
- ECCommand.performExecute()
setItems
public void setItems(Item[] aItems)
- Sets the items.
-
- Specified by:
- setItems in interface ApplyCalculationUsageCmd
-
- Parameters:
- aItems - the items.
setTaxCategoryIds
public void setTaxCategoryIds(java.lang.Integer[] anTaxCategoryIds)
- 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 interface ApplyCalculationUsageCmd
-
- Parameters:
- anTaxCategoryIds - the tax category IDs.
reset
public void reset()
- Description copied from class: AbstractECTargetableCommand
- This method should be called after a command has been executed to reset its states variables. After the call to reset, we should be able to execute the command again.
-
- Overrides:
- reset in class CalculationCmdImpl
-
- See Also:
- com.ibm.websphere.command.Command#reset()
Feedback
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.