com.ibm.commerce.messaging.commands
Class SendWCSOrderCmdImpl

java.lang.Object
  |
  +--com.ibm.commerce.command.AbstractECCommand
        |
        +--com.ibm.commerce.command.TaskCommandImpl
              |
              +--com.ibm.commerce.messaging.commands.SendWCSOrderCmdImpl
All Implemented Interfaces:
ECCommand, OrderMessagingCmd, TaskCommand

public class SendWCSOrderCmdImpl
extends TaskCommandImpl
implements OrderMessagingCmd

Task command to create and send legacy WCS Order Create message


Field Summary
static java.lang.String COPYRIGHT
          The internal copyright field.
static java.lang.Integer MSGTYPE
          Message type for WCS Order Create message = 100
protected  TypedProperty ocProp
          Used to provide data as input parms to doPreProcess() and doPostProcess()
 TypedProperty orderNVP
          Used to hold temporary name value pairs for order information retrieved from database which will be used when building the message
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.order.commands.OrderMessagingCmd
defaultCommandClassName, NAME
 
Constructor Summary
SendWCSOrderCmdImpl()
           
 
Method Summary
 boolean doPostProcess(TypedProperty aRequestProperty)
          Performs a additional processing after the command executes.
 boolean doPreProcess(TypedProperty aRequestProperty)
          Performs additional processing before the command executes.
 boolean doProcess()
          Get the order information, build the order create message and the message
 java.lang.String getDate(java.lang.String str)
          Converts timestamp string to YYYYMMDD format
 java.lang.String getHeaderExtensionRecords()
          Implement this method when you extend the command to do outbound message extension at order header level using the USRLST record.
 java.lang.String getItemExtensionRecords()
          Implement this method when you extend the command to do outbound message extension at order item level using the USRLST record.
 java.lang.String getOrderMsg()
          Get the order create message content built by the command
 java.lang.Long getOrderRn()
          Get the order reference number passed to this command
 java.lang.String getTime(java.lang.String str)
          Converts timestamp string to HHMMSS format
 boolean isReadyToCallExecute()
          This method checks if command is ready to be executed
 void performExecute()
          Execute the command by calling doPreProcess, doProcess and doPostProcess
 boolean sendMessage()
          Send the outbound order create message by doing the following - Set the content of the message - Send the message using outbound messaging system sendTransacted() service
 boolean setOrderCreateBillToData()
          Get all the bill-to data for WCS Order Create message
 boolean setOrderCreateHeaderData()
          Get all the order header values for WCS Order Create message
 boolean setOrderCreateItemData()
          Get all the order header values for WCS Order Create message
 boolean setOrderCreatePurchaserData()
          Get all the purchaser data for WCS Order Create message
 boolean setOrderCreateStoreData()
          Get all the store data for WCS Order Create message
 boolean setOrderNVPValues()
          Get all the name value pairs for the WCS Order Create message.
 void setOrderRn(java.lang.Long OrderRn)
          Sets the order reference number.
 void setRequestProperties(TypedProperty aRequestProperties)
          Set the request properties as input for the command.
 boolean writeOrder()
          Build the WCS Order Create message
 
Methods inherited from class com.ibm.commerce.command.AbstractECCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, 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
The internal copyright field.

MSGTYPE

public static final java.lang.Integer MSGTYPE
Message type for WCS Order Create message = 100

ocProp

protected TypedProperty ocProp
Used to provide data as input parms to doPreProcess() and doPostProcess()

orderNVP

public TypedProperty orderNVP
Used to hold temporary name value pairs for order information retrieved from database which will be used when building the message
Constructor Detail

SendWCSOrderCmdImpl

public SendWCSOrderCmdImpl()
Method Detail

doPostProcess

public boolean doPostProcess(TypedProperty aRequestProperty)
Performs a additional processing after the command executes.
Parameters:
aRequestProperty - com.ibm.commerce.datatype.TypedProperty
Returns:
boolean
Throws:
ECException -  

doPreProcess

public boolean doPreProcess(TypedProperty aRequestProperty)
Performs additional processing before the command executes.
Parameters:
aRequestProperty - com.ibm.commerce.datatype.TypedProperty
Returns:
boolean
Throws:
ECException -  

doProcess

public boolean doProcess()
Get the order information, build the order create message and the message
Parameters:
aRequestProperty - com.ibm.commerce.datatype.TypedProperty
Returns:
boolean

getDate

public java.lang.String getDate(java.lang.String str)
Converts timestamp string to YYYYMMDD format
Parameters:
str - java.lang.String - timestamp
Returns:
java.lang.String

getHeaderExtensionRecords

public java.lang.String getHeaderExtensionRecords()
Implement this method when you extend the command to do outbound message extension at order header level using the USRLST record. It should return a String object that contains a series of DATUSR records.

getItemExtensionRecords

public java.lang.String getItemExtensionRecords()
Implement this method when you extend the command to do outbound message extension at order item level using the USRLST record. It should return a String object that contains a series of DATUSR records.

getOrderMsg

public java.lang.String getOrderMsg()
Get the order create message content built by the command
Returns:
java.lang.String

getOrderRn

public java.lang.Long getOrderRn()
Get the order reference number passed to this command
Specified by:
getOrderRn in interface OrderMessagingCmd
Returns:
java.lang.Long

getTime

public java.lang.String getTime(java.lang.String str)
Converts timestamp string to HHMMSS format
Parameters:
str - java.lang.String - timestamp
Returns:
java.lang.String

isReadyToCallExecute

public boolean isReadyToCallExecute()
This method checks if command is ready to be executed
Overrides:
isReadyToCallExecute in class AbstractECCommand
Following copied from class: com.ibm.commerce.command.AbstractECCommand
Returns:
boolean - true if we can execute the command false if we canot execute the command

performExecute

public void performExecute()
                    throws ECException
Execute the command by calling doPreProcess, doProcess and doPostProcess
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.

sendMessage

public boolean sendMessage()
Send the outbound order create message by doing the following - Set the content of the message - Send the message using outbound messaging system sendTransacted() service
Returns:
boolean

setOrderCreateBillToData

public boolean setOrderCreateBillToData()
                                 throws ECException
Get all the bill-to data for WCS Order Create message
Returns:
boolean

setOrderCreateHeaderData

public boolean setOrderCreateHeaderData()
                                 throws ECException
Get all the order header values for WCS Order Create message
Returns:
boolean

setOrderCreateItemData

public boolean setOrderCreateItemData()
                               throws ECException
Get all the order header values for WCS Order Create message
Returns:
boolean

setOrderCreatePurchaserData

public boolean setOrderCreatePurchaserData()
                                    throws ECException
Get all the purchaser data for WCS Order Create message
Returns:
boolean

setOrderCreateStoreData

public boolean setOrderCreateStoreData()
                                throws ECException
Get all the store data for WCS Order Create message
Returns:
boolean

setOrderNVPValues

public boolean setOrderNVPValues()
Get all the name value pairs for the WCS Order Create message.
Returns:
boolean

setOrderRn

public void setOrderRn(java.lang.Long OrderRn)
Sets the order reference number.
Specified by:
setOrderRn in interface OrderMessagingCmd

setRequestProperties

public void setRequestProperties(TypedProperty aRequestProperties)
                          throws ECApplicationException
Set the request properties as input for the command.

writeOrder

public boolean writeOrder()
Build the WCS Order Create message
Parameters:
aRequestProperty - com.ibm.commerce.datatype.TypedProperty
Returns:
boolean