com.ibm.commerce.order.commands
Class OrderCopyCmdImpl

com.ibm.commerce.order.commands.OrderCopyCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, OrderCopyCmd, Protectable

public class OrderCopyCmdImpl
implements OrderCopyCmd

This is the default implementation of the OrderCopy command.


Inner classes inherited from class com.ibm.commerce.order.commands.OrderCopyCmd
OrderCopyCmd.Group
 
Field Summary
static java.lang.String COPYRIGHT
           
 
Fields inherited from interface com.ibm.commerce.order.commands.OrderCopyCmd
defaultCommandClassName, ERRCODE_ACCESS_DENIED, ERRCODE_WRONG_STATUS, NAME, ORDER_COPY_ERRVIEW
 
Constructor Summary
OrderCopyCmdImpl()
           
 
Method Summary
protected  OrderItemUpdateCmd getOrderItemUpdateCmd()
           
 AccessVector getResources()
          Gets the access vector accessed by this command.
 void performExecute()
          Contains the actual business logic of the command It should be implemented by all the command writer.
 void reset()
          Insert the method's description here.
 void setBillingAddressId(java.lang.Long anBillingAddressId)
          Set the addressId of the billing address.
 void setCopyOrderInfoFrom(java.lang.String[] astrCopyOrderInfoFrom)
          Set the source order from which the order info (e.g.
 void setCopyPaymentInfoFrom(java.lang.String[] astrCopyPaymentInfoFrom)
          Set the source order from which the payment info will be copied.
 void setDescription(java.lang.String astrDescription)
          Set the description of the target order.
 void setDisplaySequence(java.lang.Double adDisplaySequence)
          Set the display sequence of the target order.
 void setField1(java.lang.Integer anField1)
          Set field1 of the target order.
 void setField2(java.math.BigDecimal adField2)
          Set field2 of the target order.
 void setField3(java.lang.String astrField3)
          Set field3 of the target order.
 void setGroups(OrderCopyCmd.Group[] aGroups)
          Set the enumerationGroups.
An enumerationGroup consists of:
Double idQuantity
Hashtable ihshAttributes
Long inAddressId
Long inCatalogEntryId
Long[] inContractIds
Integer inField1
Long inMemberId
Long[] inOfferIds
Integer inShipmodeId
String istrComment
String[] istrCopyOrderItemAbbreviations
String istrField2
String[] istrFromOrderAbbreviations
String istrPartNumber
String istrUom
String[] istrUpdateOrderItemAbbreviations
These parameters will be passed (as input parameters) to OrderItemUpdate.
 void setOutOrderItemNames(java.lang.String[] astrOutOrderItemNames)
          Set the names of the orderItemId NVPs to be appended to the redirection URL.
 void setOutOrderNames(java.lang.String[] astrOutOrderNames)
          Set the names of the orderId NVPs to be appended to the redirection URL.
 void setPayment(java.util.Hashtable ahshPayment)
          Set the payment NVPs of the target order.
protected  void setPriceAndCurrency(java.lang.Integer an, java.math.BigDecimal adPrice, java.lang.String astrCurrency)
           
 void setRequestProperties(TypedProperty ahshRequestProperties)
          The WebController calls this method before invoking the execute method in this command to set the request properties for this command.
 void setStatus(java.lang.String astrStatus)
          Set the status of the target order.
 void setTcId(java.lang.Long anTcId)
          Set the PaymentTC that the billing address will be checked against.
 void setToOrderAbbreviations(java.lang.String[] astrToOrderAbbreviations)
          Set the target order.
 void validateParameters()
          Performs server side parameter checking.
 
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Constructor Detail

OrderCopyCmdImpl

public OrderCopyCmdImpl()
Method Detail

getOrderItemUpdateCmd

protected OrderItemUpdateCmd getOrderItemUpdateCmd()
                                            throws ECException

getResources

public AccessVector getResources()
                          throws ECException
Description copied from interface: ECCommand
Gets the access vector accessed by this command. The default implementation returns null indicating that no protectable resource is accessed by this command. It is the responsibilities of the command writer to return the protectable primary resource(s) and the corresponding actions accessed by this command.

Specified by:
getResources in interface ECCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Returns:
AccessVector - a vector of resource action pairs

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
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
com.ibm.commerce.command.CommandException - The superclass for all ECExceptions.

reset

public void reset()
Insert the method's description here. Creation date: (05/20/01 2:42:35 PM)

setBillingAddressId

public void setBillingAddressId(java.lang.Long anBillingAddressId)
Description copied from interface: OrderCopyCmd
Set the addressId of the billing address.
Specified by:
setBillingAddressId in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
anBillingAddressId - the addressId.

setCopyOrderInfoFrom

public void setCopyOrderInfoFrom(java.lang.String[] astrCopyOrderInfoFrom)
Description copied from interface: OrderCopyCmd
Set the source order from which the order info (e.g. billingAddress) will be copied.
Specified by:
setCopyOrderInfoFrom in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
astrCopyOrderInfoFrom - the source order.

setCopyPaymentInfoFrom

public void setCopyPaymentInfoFrom(java.lang.String[] astrCopyPaymentInfoFrom)
Description copied from interface: OrderCopyCmd
Set the source order from which the payment info will be copied.
Specified by:
setCopyPaymentInfoFrom in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
astrCopyPaymentInfoFrom - the source order.

setDescription

public void setDescription(java.lang.String astrDescription)
Description copied from interface: OrderCopyCmd
Set the description of the target order.
Specified by:
setDescription in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
astrDescription - the description.

setDisplaySequence

public void setDisplaySequence(java.lang.Double adDisplaySequence)
Description copied from interface: OrderCopyCmd
Set the display sequence of the target order.
Specified by:
setDisplaySequence in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
adDisplaySequence - the display sequence.

setField1

public void setField1(java.lang.Integer anField1)
Description copied from interface: OrderCopyCmd
Set field1 of the target order.
Specified by:
setField1 in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
anField1 - the value of field1.

setField2

public void setField2(java.math.BigDecimal adField2)
Description copied from interface: OrderCopyCmd
Set field2 of the target order.
Specified by:
setField2 in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
adField2 - the value of field2.

setField3

public void setField3(java.lang.String astrField3)
Description copied from interface: OrderCopyCmd
Set field3 of the target order.
Specified by:
setField3 in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
astrField3 - the value of field3.

setGroups

public void setGroups(OrderCopyCmd.Group[] aGroups)
Description copied from interface: OrderCopyCmd
Set the enumerationGroups.
An enumerationGroup consists of:
Double idQuantity
Hashtable ihshAttributes
Long inAddressId
Long inCatalogEntryId
Long[] inContractIds
Integer inField1
Long inMemberId
Long[] inOfferIds
Integer inShipmodeId
String istrComment
String[] istrCopyOrderItemAbbreviations
String istrField2
String[] istrFromOrderAbbreviations
String istrPartNumber
String istrUom
String[] istrUpdateOrderItemAbbreviations
These parameters will be passed (as input parameters) to OrderItemUpdate.
Specified by:
setGroups in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
aGroups - the enumerationGroups.

setOutOrderItemNames

public void setOutOrderItemNames(java.lang.String[] astrOutOrderItemNames)
Description copied from interface: OrderCopyCmd
Set the names of the orderItemId NVPs to be appended to the redirection URL.
Specified by:
setOutOrderItemNames in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
astrOutOrderItemNames - the names of the orderItemId NVPs.

setOutOrderNames

public void setOutOrderNames(java.lang.String[] astrOutOrderNames)
Description copied from interface: OrderCopyCmd
Set the names of the orderId NVPs to be appended to the redirection URL.
Specified by:
setOutOrderNames in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
astrOutOrderNames - the names of the orderId NVPs.

setPayment

public void setPayment(java.util.Hashtable ahshPayment)
Description copied from interface: OrderCopyCmd
Set the payment NVPs of the target order.
Specified by:
setPayment in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
ahshPayment - the payment NVPs.

setPriceAndCurrency

protected void setPriceAndCurrency(java.lang.Integer an,
                                   java.math.BigDecimal adPrice,
                                   java.lang.String astrCurrency)
                            throws ECException

setRequestProperties

public void setRequestProperties(TypedProperty ahshRequestProperties)
                          throws ECApplicationException
Description copied from interface: ControllerCommand
The WebController calls this method before invoking the execute method in this command to set the request properties for this command. It is the responsibility of the implementer of the ControllerCommand to extract the required input parameters from the request properties and perform parameter checking.
Specified by:
setRequestProperties in interface ControllerCommand
Following copied from interface: com.ibm.commerce.command.ControllerCommand
Parameters:
requestProperties - com.ibm.commerce.datatype.TypedProperty
Throws:
com.ibm.commerce.exception.ECException. -  

setStatus

public void setStatus(java.lang.String astrStatus)
Description copied from interface: OrderCopyCmd
Set the status of the target order.
Specified by:
setStatus in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
astrStatus - the status ("P" or "I").

setTcId

public void setTcId(java.lang.Long anTcId)
Description copied from interface: OrderCopyCmd
Set the PaymentTC that the billing address will be checked against.
Specified by:
setTcId in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
anTcId - the tcId of the PaymentTC

setToOrderAbbreviations

public void setToOrderAbbreviations(java.lang.String[] astrToOrderAbbreviations)
Description copied from interface: OrderCopyCmd
Set the target order.
Specified by:
setToOrderAbbreviations in interface OrderCopyCmd
Following copied from interface: com.ibm.commerce.order.commands.OrderCopyCmd
Parameters:
astrToOrderAbbreviations - the target order.

validateParameters

public void validateParameters()
                        throws ECException
Description copied from interface: ECCommand
Performs server side parameter checking. This method replaces the checkParameters() method in a previous version of the code.

Specified by:
validateParameters in interface ECCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
ECException. -