com.ibm.commerce.orderitems.commands
Class AddOrderItemComponentsCmdImpl

java.lang.Object
  |
  +--com.ibm.commerce.command.AbstractECCommand
        |
        +--com.ibm.commerce.command.TaskCommandImpl
              |
              +--com.ibm.commerce.orderitems.commands.AddOrderItemComponentsCmdImpl
All Implemented Interfaces:
AddOrderItemComponentsCmd, ECCommand, TaskCommand

public class AddOrderItemComponentsCmdImpl
extends TaskCommandImpl
implements AddOrderItemComponentsCmd

Creates the componets that are associated with a composite order item. It derives the component list in one of two ways

Only one of the ConfigurationId and the Components are required. Quantity is only required if a component list is provided If the componets are explicitly set, then they are used, otherwise, they are dervied from the ConfigurationId.


Field Summary
static java.lang.String COPYRIGHT
           
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.orderitems.commands.AddOrderItemComponentsCmd
defaultCommandClassName, ERRTASK_NAME, NAME
 
Constructor Summary
AddOrderItemComponentsCmdImpl()
           
 
Method Summary
 java.util.Vector getOutComponentList()
          Gets the output list of components that were created or updated.
 void performExecute()
          Contains the actual business logic of the command It should be implemented by all the command writer.
 void setComponents(java.lang.Long[] anCatentry)
          Set a list of Catalog Entries (components) that will be added to the OrderItem.
 void setConfigurationId(java.lang.String astrConfigurationId)
          Sets the Configuration id that is used to retrieve the components
 void setCurrency(java.lang.String astrCurrency)
          (Optional)Sets the currency for the prices of the components.
 void setOrderItemId(java.lang.Long anOrderItemId)
          (Optional) Set an OrderItem that the componets will be added to.
 void setPrices(java.math.BigDecimal[] anPrice)
          (Optional) Sets a list of prices for the components that will be added to the OrderItem.
 void setQuantity(java.lang.Double[] anQuantity)
          Set a list of quantities of each Catalog Entry (component) that will be added to the OrderItem.
 
Methods inherited from class com.ibm.commerce.command.AbstractECCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, 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.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Constructor Detail

AddOrderItemComponentsCmdImpl

public AddOrderItemComponentsCmdImpl()
Method Detail

getOutComponentList

public java.util.Vector getOutComponentList()
Gets the output list of components that were created or updated.
Specified by:
getOutComponentList in interface AddOrderItemComponentsCmd

performExecute

public void performExecute()
                    throws ECException
Description copied from interface: ECCommand
Contains the actual business logic of the command It should be implemented by all the command writer.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
com.ibm.commerce.command.CommandException - The superclass for all ECExceptions.

setComponents

public void setComponents(java.lang.Long[] anCatentry)
Set a list of Catalog Entries (components) that will be added to the OrderItem.
Specified by:
setComponents in interface AddOrderItemComponentsCmd

setConfigurationId

public void setConfigurationId(java.lang.String astrConfigurationId)
Sets the Configuration id that is used to retrieve the components
Specified by:
setConfigurationId in interface AddOrderItemComponentsCmd

setCurrency

public void setCurrency(java.lang.String astrCurrency)
(Optional)Sets the currency for the prices of the components.
Specified by:
setCurrency in interface AddOrderItemComponentsCmd

setOrderItemId

public void setOrderItemId(java.lang.Long anOrderItemId)
(Optional) Set an OrderItem that the componets will be added to.
Specified by:
setOrderItemId in interface AddOrderItemComponentsCmd

setPrices

public void setPrices(java.math.BigDecimal[] anPrice)
(Optional) Sets a list of prices for the components that will be added to the OrderItem.
Specified by:
setPrices in interface AddOrderItemComponentsCmd

setQuantity

public void setQuantity(java.lang.Double[] anQuantity)
Set a list of quantities of each Catalog Entry (component) that will be added to the OrderItem.
Specified by:
setQuantity in interface AddOrderItemComponentsCmd