com.ibm.commerce.messaging.commands
Class SendXMLOrderCmdImpl

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

public class SendXMLOrderCmdImpl
extends TaskCommandImpl
implements OrderMessagingCmd

Task command to create and send XML Order Create message


Field Summary
static java.lang.String COPYRIGHT
          The internal copyright field.
static java.lang.Integer MSGTYPE
          Message type for XML Order Create message = 101
protected  TypedProperty ocProp
           
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.order.commands.OrderMessagingCmd
defaultCommandClassName, NAME
 
Constructor Summary
SendXMLOrderCmdImpl()
           
 
Method Summary
 boolean composeOrder()
          Build the XML Order Create message using the outbound messaging system composition services and OrderCreateXML.jsp template
 boolean doPostProcess(TypedProperty aRequestProperty)
          Performs additional processing after the command executes.
 boolean doPreProcess(TypedProperty aRequestProperty)
          Performs additional processing before the command executes.
 boolean doProcess()
           
 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 UserData XML element and should return a String object that contains a series of UserDataField elements.
 java.lang.String getItemExtensionRecords()
          Implement this method when you extend the command to do outbound message extension at order item level using the UserData XML element and should return a String object that contains a series of UserDataField elements.
 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 XML order create message using outbound messaging system sendTransacted() service
 void setOrderRn(java.lang.Long OrderRn)
          Sets the order reference number.
 void setRequestProperties(TypedProperty aRequestProperties)
          Set the request properties as input for the command.
 
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 XML Order Create message = 101

ocProp

protected TypedProperty ocProp
Constructor Detail

SendXMLOrderCmdImpl

public SendXMLOrderCmdImpl()
Method Detail

composeOrder

public boolean composeOrder()
                     throws ECException
Build the XML Order Create message using the outbound messaging system composition services and OrderCreateXML.jsp template
Returns:
boolean

doPostProcess

public boolean doPostProcess(TypedProperty aRequestProperty)
Performs 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()

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 UserData XML element and should return a String object that contains a series of UserDataField elements.

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 UserData XML element and should return a String object that contains a series of UserDataField elements.

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()
                    throws ECException
Send the outbound XML order create message using outbound messaging system sendTransacted() service
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.