com.ibm.commerce.messaging.commands

Class SendXMLOrderCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, OrderMessagingCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class SendXMLOrderCmdImpl
    extends TaskCommandImpl
    implements OrderMessagingCmd
    Task command to create and send OrderCreateXMLFormat message.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The IBM copyright notice field.
        See Also:
        Constant Field Values
      • MSGTYPE

        public static final java.lang.Integer MSGTYPE
        Deprecated. This field is replaced by MSGTYPENAME.
        Message type ID for OrderCreateXMLFormat message, which is 101. It is no longer used.
      • MSGTYPENAME

        public static final java.lang.String MSGTYPENAME
        Message type name for OrderCreateXMLFormat message (OrderCreateXMLFormat).
        See Also:
        Constant Field Values
    • Constructor Detail

      • SendXMLOrderCmdImpl

        public SendXMLOrderCmdImpl()
    • Method Detail

      • composeOrder

        public boolean composeOrder()
                             throws ECException
        This method builds the OrderCreateXMLFormat message using the outbound messaging system composition services and OrderCreateXML.jsp template.
        Returns:
        true if no exception was encountered; false otherwise.
        Throws:
        ECException
      • doPostProcess

        public boolean doPostProcess(TypedProperty aRequestProperty)
        This method performs additional processing after the command executes.
        Parameters:
        aRequestProperty - com.ibm.commerce.datatype.TypedProperty
        Returns:
        true under the current implementation.
      • doPreProcess

        public boolean doPreProcess(TypedProperty aRequestProperty)
        This method performs additional processing before the command executes.
        Parameters:
        aRequestProperty - com.ibm.commerce.datatype.TypedProperty
        Returns:
        true under the current implementation.
      • doProcess

        public boolean doProcess()
        This method gets the order information, builds the order create message, and sends the message.
        Returns:
        true when there is no exception encountered; false otherwise.
      • getDate

        public java.lang.String getDate(java.lang.String str)
        This method converts timestamp string to
        YYYYMMDD
        format.
        Parameters:
        str - the timestamp string
        Returns:
        the string with the date
      • getHeaderExtensionRecords

        public java.lang.String getHeaderExtensionRecords()
        Implement this method when extending the command for outbound message extension at the order header level using the UserData XML element. This should return a String object that contains a series of UserDataField elements.
        Returns:
        null under the current implementation.
      • getItemExtensionRecords

        public java.lang.String getItemExtensionRecords()
        Implement this method when extending the command for outbound message extension at the order item level using the UserData XML element. This should return a String object that contains a series of UserDataField elements.
        Returns:
        null under the current implementation.
      • getOrderRn

        public java.lang.Long getOrderRn()
        This method gets the order reference number passed to this command.
        Specified by:
        getOrderRn in interface OrderMessagingCmd
        Returns:
        the order reference number
      • getTime

        public java.lang.String getTime(java.lang.String str)
        This method converts timestamp string to
        HHMMSS
        format
        Parameters:
        str - the timestamp in String format
        Returns:
        the time string
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        This method checks if the command is ready to call performExecute.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Overrides:
        isReadyToCallExecute in class AbstractECTargetableCommand
        Returns:
        true if the command is ready to call performExecute() method; false otherwise.
      • sendMessage

        public boolean sendMessage()
                            throws ECException
        This method sends the outbound OrderCreateXMLFormat message using outbound messaging system sendTransacted() service.
        Returns:
        true when there is no exception encountered; false otherwise.
        Throws:
        ECException
      • setOrderRn

        public void setOrderRn(java.lang.Long anOrderRn)
        This method sets the order reference number used in the command.
        Specified by:
        setOrderRn in interface OrderMessagingCmd
        Parameters:
        anOrderRn - The order reference number.
      • setRequestProperties

        public void setRequestProperties(TypedProperty aRequestProperties)
                                  throws ECApplicationException
        This method sets the request properties as input for the command.
        Parameters:
        aRequestProperties - The request properties object of the command.
        Throws:
        ECApplicationException
      • getMsgObj

        public Messaging getMsgObj()
        This method gets the Messaging object.
        Returns:
        the Messaging object
      • setMsgObj

        public void setMsgObj(Messaging aMsgObj)
        This method sets the Messaging object.
        Parameters:
        aMsgObj - The Messaging object used in this class.
      • setException

        public void setException(java.lang.Exception ex)
        Sets the execution exception when it happens.
        Parameters:
        ex - The exception thrown when the logic of this class executes.