com.ibm.commerce.order.commands
Class OrderCopyCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.order.commands.OrderCopyCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderConstants, OrderCopyCmd

public class OrderCopyCmdImpl
extends ControllerCommandImpl
implements OrderConstants, OrderCopyCmd

This is the default implementation of the OrderCopy controller command. This command calls the following TaskCommands:

This command uses the following AccessBeans:
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.ibm.commerce.order.commands. OrderCopyCmd
OrderCopyCmd.Group
 
Field Summary
static java.lang.String COPYRIGHT
          IBM Copyright notice field.
 
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.order.utils. OrderConstants
COMMIT_FALSE, COMMIT_TRUE, CONTINUE_FALSE, CONTINUE_TRUE, EC_ADDRESS_ID, EC_ALLOCATE, EC_ATTR_NAME, EC_ATTR_VALUE, EC_ATTRIBUTE_PREFIX, EC_AVAILABILITY_CHANGE, EC_AVAILABILITY_CHANGE_URL, EC_BACKORDER, EC_BACKORDERED_ORDER_ITEMS, EC_BASEITEM_TYPE_DNKT, EC_BASEITEM_TYPE_STKT, EC_BID_USER_ID, EC_BILLING_ADDRESS_ID, EC_CATALOG_ENTRY_ID, EC_CATENTRY_ID, EC_CHECK, EC_COMMENT, EC_COMMIT, EC_COMPONENT_ID, EC_CONFIGURATION_ID, EC_CONTINUE, EC_CONTRACT_ID, EC_COPY_ORDER_INFO_FROM, EC_COPY_ORDERITEM_ID, EC_COPY_PAYMENT_INFO_FROM, EC_CORRELATTION_GROUP, EC_CREATE_IF_EMPTY, EC_CURRENCY, EC_DELETE_IF_EMPTY, EC_DESCRIPTION, EC_DISPLAY_SEQUENCE, EC_DYN_KIT_PRICE_CONTRACT_ID, EC_DYN_KIT_PRICE_TC_ID, EC_DYN_KIT_PRICE_TRADING_ID, EC_ERROR_CODE_AVAILABILITY_CHANGE, EC_ERROR_CODE_LOW_INVENTORY, EC_ERROR_CODE_ORDPROCESS_FAILED, EC_ERROR_CODE_QUOTE_EXPIRED, EC_ERRORURL, EC_EXPAND_CONFIGURATION_ID, EC_EXT_COMMUNICATION_STATUS_AUTH_FAIL, EC_EXT_COMMUNICATION_STATUS_OK, EC_EXT_COMMUNICATION_STATUS_UNKNOWN, EC_EXT_ORDER_ID, EC_EXT_ORDER_REF, EC_EXT_PWD_ID, EC_EXT_USER_ID, EC_FAILORDER, EC_FFMSELECTION_NOCHANGE, EC_FFMSELECTION_PREFERCURRENT, EC_FIELD_PARAM, EC_FIELD1, EC_FIELD2, EC_FIELD3, EC_FROM_ORDER_ID, EC_FROM_ORDER_ITEM_ID, EC_FULFILLMENT_CENTER_ID, EC_IN_ALLOCATE, EC_IN_BACKORDER, EC_IN_CHECK, EC_IN_MERGE, EC_IN_ORDER_DEFAULT_NAME, EC_IN_ORDER_ITEM_NAME, EC_IN_ORDER_NAME, EC_IN_ORDERITEM_DEFAULT_NAME, EC_IN_REMERGE, EC_IN_REVERSE, EC_LIST_ID, EC_MAX_AVAILABILITY_CHANGE, EC_MEMBER_ID, EC_MERCHANT_ORDER_NOTIFY_MSG_TYPE, EC_MERGE, EC_NO_INVENTORY, EC_NO_INVENTORY_ORDER_ITEMS, EC_NO_INVENTORY_URL, EC_NON_BUYABLE_ORDER_ITEMS, EC_NOTIFICATION_PREFIX, EC_NOTIFY_MERCHANT, EC_NOTIFY_ORDER_SUBMITTED, EC_NOTIFY_SHOPPER, EC_NVP_NAME_ORDERS_EXCEPTIONS, EC_NVP_NAME_ORDERS_SUCCEEDED, EC_OFFER_ID, EC_OKURL, EC_ORDER_AUTHORIZED_MSG_TYPE, EC_ORDER_CANCELLED_FOR_MERCHANT_MSG_TYPE, EC_ORDER_CANCELLED_MSG_TYPE, EC_ORDER_COMMENT, EC_ORDER_DESC, EC_ORDER_FLOW_DOMAIN_IDENTIFIER, EC_ORDER_FLOW_IDENTIFIER, EC_ORDER_FLOW_STATE_IDENTIFIER_APPROVED, EC_ORDER_FLOW_STATE_IDENTIFIER_CANCELED, EC_ORDER_FLOW_STATE_IDENTIFIER_CHECK_APPROVAL, EC_ORDER_FLOW_STATE_IDENTIFIER_PENDING_APPROVAL, EC_ORDER_FLOW_STATE_IDENTIFIER_REJECTED, EC_ORDER_FLOW_STATE_IDENTIFIER_START, EC_ORDER_FLOW_TRANSIT_EVENT_AUTO_APPROVE, EC_ORDER_FLOW_TRANSIT_EVENT_AUTO_REJECT, EC_ORDER_FLOW_TRANSIT_EVENT_BEGIN_APPROVAL, EC_ORDER_FLOW_TRANSIT_EVENT_ORDER_PROCESS, EC_ORDER_FLOW_TYPE_IDENTIFIER, EC_ORDER_ID, EC_ORDER_PROCESS_ERROR_VIEW, EC_ORDER_PROFILE, EC_ORDER_RECEIVED_MSG_TYPE, EC_ORDER_REJECTED_MSG_TYPE, EC_ORDER_RN, EC_ORDER_STATE, EC_ORDERITEM_ID, EC_ORDERITEM_RN, EC_ORDERLISTSUMMARY, EC_ORDERSUMMARY, EC_ORDERTOTALS, EC_OUT_ALLOCATE, EC_OUT_BACKORDER, EC_OUT_CHECK, EC_OUT_MERGE, EC_OUT_ORDER_ID, EC_OUT_ORDER_NAME, EC_OUT_ORDERITEM_NAME, EC_OUT_REMERGE, EC_OUT_REVERSE, EC_OUTOKORDERIDNAME, EC_OUTTIMEOUTORDERIDNAME, EC_OUTWAITORDERIDNAME, EC_PART_NUMBER, EC_PART_OWNER_ID, EC_PAYMENT_PREFIX, EC_PRICE, EC_PURGE, EC_Q_EXP_ALWAYS_PROCEED, EC_Q_EXP_NEVER_PROCEED, EC_Q_EXP_STOP_ON_BIGGER_TOTAL, EC_QUANTITY, EC_QUOTATION_SUBMISSION, EC_QUOTATION_SUBMISSION_FALSE, EC_QUOTATION_SUBMISSION_TRUE, EC_QUOTE_EXPIRED, EC_QUOTE_EXPIRED_URL, EC_QUOTE_EXPIRY_POLICY, EC_REDUCEPARENT_QUANTITIES, EC_REDUCEPARENT_QUANTITIES_FALSE, EC_REDUCEPARENT_QUANTITIES_TRUE, EC_REMERGE, EC_REQUISITION_LIST_ID, EC_REQUISITION_LIST_NAME, EC_REQUISITION_LIST_STATUS, EC_REQUISITION_LIST_STORE_ID, EC_RETAIN_ORDER_CURRENCY, EC_REVERSE, EC_SHIPMODE_ID, EC_SHIPMODE_RN, EC_SHIPPING_ARRANGEMENT_RESTRICTED, EC_STATUS, EC_STATUS_CODE, EC_STATUS_MSG, EC_TIMEOUTURL, EC_TO_ORDER_ID, EC_TRANSFERMODE, EC_UOM, EC_UPDATE_ORDERITEM_ID, EC_USAGE, EC_WAITURL, EC_XML_CONFIG_COMPONENT, EC_XML_CONFIG_COMPONENTLIST, EC_XML_CONFIG_CONFIGURATION, EC_XML_CONFIG_CONFIGURATION_ID, EC_XML_CONFIG_CURRENCY, EC_XML_CONFIG_DTD_PATH, EC_XML_CONFIG_DYNAMIC_KIT, EC_XML_CONFIG_MEMBER_ID, EC_XML_CONFIG_QUANTITY, EC_XML_CONFIG_SELECTICA_CONFIGURATION, EC_XML_CONFIG_UNIT_PRICE, EC_XML_CONFIG_WCSITEM, EC_XML_CONFIG_WCSPARTNUMBER, EC_XML_CONFIGURATION, FFMOPERATIONS_MULTIITEM, FFMOPERATIONS_NOALLOCAITON, FFMOPERATIONS_NOBACKORDER, FFMOPERATIONS_NOCHECK, LINEITEMTYPE_ALTERNATIVE, ORDER_AUTH_ALLOWED, ORDER_BACKORDERED, ORDER_CANCELLED, ORDER_COMPLETED, ORDER_DENIED, ORDER_DEPOSITED, ORDER_EDITED, ORDER_INV_UPDATE_FAILED, ORDER_ITEM_COL_LAST_UPDATE, ORDER_ITEM_COL_MERCHANT_REF_NUM, ORDER_ITEM_COL_ORDER_REF_NUM, ORDER_ITEM_COL_SHOPPER_REF_NUM, ORDER_LOCKED, ORDER_PAYMENT_AUTH_REVIEW, ORDER_PENDING, ORDER_PENDING_REMOTE_FULFILLMENT, ORDER_READY_FOR_REMOTE_FULFILLMENT, ORDER_RELEASED, ORDER_REMOTE_FULFILLMENT_FAILED, ORDER_SHIPPED, ORDER_SUBMITTED, ORDER_UNLOCKED, ORDER_WAITING_APPROVAL, ORDERREL_MANIFESTED, ORDERREL_PICKED, ORDERREL_SHIPPED, PREPAREFLAGS_AUTO_ADD, PREPAREFLAGS_DIRECT_CALCULATION_CODE_ATTACHMENT, PREPAREFLAGS_FULFILLMENT_CENTER_OVERRIDE, PREPAREFLAGS_GENERATED, PREPAREFLAGS_HAS_PERSONALIZATION_ATTRIBUTES, PREPAREFLAGS_NOT_CONFIGURED, PREPAREFLAGS_PRICE_OVERRIDE, PREPAREFLAGS_QUOTATION, PREPAREFLAGS_QUOTATION_, PREPAREFLAGS_SHIPPING_CHARGE_BY_CARRIER, REQUISITION_LIST_DETAIL_VIEW, REQUISITION_LIST_STATUS_PRIVATE, REQUISITION_LIST_STATUS_SHAREABLE, REQUISITION_LIST_VIEW, SHIPTO_ADDRESS_REQUIRED, SUBMIT_ERROR_STATUS
 
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()
          Get the OrderItemUpdateCmd to be used by OrderCopyCmdImpl.
  AccessVector getResources()
          Returns an AccessVector containing the Protectable resources with the actions this command will perform on them.
 void performExecute()
          Executes the main business logic of the command.
 void reset()
          Resets instance variables to their initial values.
 void setBillingAddressId(java.lang.Long anBillingAddressId)
          Set the addressId of the billing address.
 void setContinue(java.lang.String astrContinue)           Set the continue parameter (optional). If an OrderItem cannot be created or updated in the target Order, 0 - terminate execution and rollback. 1 - ignore the create or update operation for that OrderItem and continue execution.
 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 enumeration groups. An enumeration group consists of parameters that will be passed (as input parameters) to OrderItemUpdateCmd.
 void setOrderComment(java.lang.String astrOrderComment)
          Set the order comment (optional).
 void setOutOrderItemNames(java.lang.String[] astrOutOrderItemNames)
          Sets the names of the orderItemId properties to be appended to the redirection URL.
 void setOutOrderNames(java.lang.String[] astrOutOrderNames)
          Sets the names of the orderId properties to be appended to the redirection URL.
 void setPayment(java.util.Hashtable ahshPayment)
          Set the payment information of the target order.
protected  void setPriceAndCurrency(java.lang.Integer an, java.math.BigDecimal adPrice, java.lang.String astrCurrency)
          Deprecated.  
 void setRequestProperties( TypedProperty ahshRequestProperties)
          Extracts input parameters from the specified request properties.
 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()
          Validates the input parameters.
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 
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. ControllerCommand
checkPermission, 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, getResourceOwners, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command. ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM Copyright notice field.
See Also:
Constant Field Values
Constructor Detail

OrderCopyCmdImpl

public OrderCopyCmdImpl()
Method Detail

getOrderItemUpdateCmd

protected OrderItemUpdateCmd getOrderItemUpdateCmd()
                                            throws ECException
Get the OrderItemUpdateCmd to be used by OrderCopyCmdImpl.
Returns:
the OrderItemUpdateCmd.
ECException

getResources

public AccessVector getResources()
                          throws ECException
Returns an AccessVector containing the Protectable resources with the actions this command will perform on them. The OrderAccessBeans to be read or written, and the StoreAccessBean for the Store in the CommandContext if a new Order is to be created.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
the {@link AccessVector.
Throws:
ECException
See Also:
ECCommand.getResources()

performExecute

public void performExecute()
                    throws ECException
Executes the main business logic of the command. Behaviour:
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException -
See Also:
ECCommand.performExecute()

reset

public void reset()
Resets instance variables to their initial values.
Overrides:
reset in class AbstractECTargetableCommand

setBillingAddressId

public void setBillingAddressId(java.lang.Long anBillingAddressId)
Set the addressId of the billing address.
Specified by:
setBillingAddressId in interface OrderCopyCmd
Parameters:
anBillingAddressId - the addressId.

setCopyOrderInfoFrom

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

setCopyPaymentInfoFrom

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

setDescription

public void setDescription(java.lang.String astrDescription)
Set the description of the target order.
Specified by:
setDescription in interface OrderCopyCmd
Parameters:
astrDescription - the description.

setDisplaySequence

public void setDisplaySequence(java.lang.Double adDisplaySequence)
Set the display sequence of the target order.
Specified by:
setDisplaySequence in interface OrderCopyCmd
Parameters:
adDisplaySequence - the display sequence.

setField1

public void setField1(java.lang.Integer anField1)
Set field1 of the target order.
Specified by:
setField1 in interface OrderCopyCmd
Parameters:
anField1 - the value of field1.

setField2

public void setField2(java.math.BigDecimal adField2)
Set field2 of the target order.
Specified by:
setField2 in interface OrderCopyCmd
Parameters:
adField2 - the value of field2.

setField3

public void setField3(java.lang.String astrField3)
Set field3 of the target order.
Specified by:
setField3 in interface OrderCopyCmd
Parameters:
astrField3 - the value of field3.

setGroups

public void setGroups(OrderCopyCmd.Group[] aGroups)
Set the enumeration groups.
An enumeration group consists of parameters that will be passed (as input parameters) to OrderItemUpdateCmd.
Specified by:
setGroups in interface OrderCopyCmd
Parameters:
aGroups - the enumeration groups.

setOutOrderItemNames

public void setOutOrderItemNames(java.lang.String[] astrOutOrderItemNames)
Sets the names of the orderItemId properties to be appended to the redirection URL. Each name causes properties to be appended to the redirection URL with the specified name, and with values of the OrderItemIds that were created or updated.
Specified by:
setOutOrderItemNames in interface OrderCopyCmd
Parameters:
astrOutOrderItemNames - the names of the orderItemId properties.

setOutOrderNames

public void setOutOrderNames(java.lang.String[] astrOutOrderNames)
Sets the names of the orderId properties to be appended to the redirection URL. Each name causes properties to be appended to the redirection URL with the specified name, and with values of the OrderId that was created or updated.
Specified by:
setOutOrderNames in interface OrderCopyCmd
Parameters:
astrOutOrderNames - the names of the orderId properties.

setPayment

public void setPayment(java.util.Hashtable ahshPayment)
Set the payment information of the target order.
Specified by:
setPayment in interface OrderCopyCmd
Parameters:
ahshPayment - the payment information.
  • Key: payment information name (String).
  • Value: payment information values (String[] ) .

setPriceAndCurrency

protected void setPriceAndCurrency(java.lang.Integer an,
                                   java.math.BigDecimal adPrice,
                                   java.lang.String astrCurrency)
                            throws ECException
Deprecated.  
This default implementation does nothing.
Throws:
ECException

setRequestProperties

public void setRequestProperties(TypedProperty ahshRequestProperties)
                          throws ECApplicationException
Extracts input parameters from the specified request properties.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
ahshRequestProperties - request properties
Throws:
ECApplicationException - The _ERR_BAD_MISSING_CMD_PARAMETER message is passed, with the name of the invalid or missing property name.
ECException -
See Also:
ControllerCommand.setRequestProperties(TypedProperty)

setStatus

public void setStatus(java.lang.String astrStatus)
Set the status of the target order.
Specified by:
setStatus in interface OrderCopyCmd
Parameters:
astrStatus - the status ("P" or "I").

setTcId

public void setTcId(java.lang.Long anTcId)
Set the PaymentTC that the billing address will be checked against.
Specified by:
setTcId in interface OrderCopyCmd
Parameters:
anTcId - the tcId of the PaymentTC

setToOrderAbbreviations

public void setToOrderAbbreviations(java.lang.String[] astrToOrderAbbreviations)
Set the target order.
Specified by:
setToOrderAbbreviations in interface OrderCopyCmd
Parameters:
astrToOrderAbbreviations - the target order.

validateParameters

public void validateParameters()
                        throws ECException
Validates the input parameters.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECApplicationException - The _ERR_BAD_MISSING_CMD_PARAMETER message is passed, with the name of the invalid or missing property name.
ECException -
See Also:
ECCommand.validateParameters()

setContinue

public void setContinue(java.lang.String astrContinue)
Description copied from interface: OrderCopyCmd
Set the continue parameter (optional). If an OrderItem cannot be created or updated in the target Order, 0 - terminate execution and rollback. 1 - ignore the create or update operation for that OrderItem and continue execution.
Specified by:
setContinue in interface OrderCopyCmd
Parameters:
astrContinue - the continue parameter.
See Also:
OrderCopyCmd.setContinue(String)

setOrderComment

public void setOrderComment(java.lang.String astrOrderComment)
Description copied from interface: OrderCopyCmd
Set the order comment (optional).
Specified by:
setOrderComment in interface OrderCopyCmd
Parameters:
astrOrderComment - the order comment.
See Also:
OrderCopyCmd.setOrderComment(String)