com.ibm.commerce.messaging.commands
Class SendWCSOrderCmdImpl
java.lang.Object
CacheableCommandImpl
com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.command.TaskCommandImpl
com.ibm.commerce.messaging.commands.SendWCSOrderCmdImpl
- All Implemented Interfaces:
- ECCommand, ECTargetableCommand, OrderMessagingCmd, TaskCommand
- public class SendWCSOrderCmdImpl
- extends TaskCommandImpl
- implements OrderMessagingCmd
Task command to create and send legacy WCS Order Create message.
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
COPYRIGHT
The IBM copyright notice field. |
static java.lang.Integer |
MSGTYPE
Message type id for WCS Order Create message, which is 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. |
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()
Gets the order information, builds the order create message and sends the message |
java.lang.String |
getDate(java.lang.String str)
Converts timestamp string to YYYYMMDD format. |
java.lang.String |
getHeaderExtensionRecords()
Implements this method when you extend the command to do outbound message extension at order header level using the USRLST record. |
java.lang.String |
getItemExtensionRecords()
Implements this method when you extend the command to do outbound message extension at order item level using the USRLST record. |
java.lang.StringBuffer |
getOrderMsg()
Gets the order create message content built by the command. |
java.lang.Long |
getOrderRn()
Gets the order reference number passed to this command. |
java.lang.String |
getTime(java.lang.String str)
Converts timestamp string to HHMMSS format |
boolean |
isReadyToCallExecute()
Checks if the command is ready to call Execute. |
void |
performExecute()
Executes the command by calling doPreProcess, doProcess and doPostProcess |
boolean |
sendMessage()
Sends the outbound order create message by doing the following: - Sets the content of the message. |
boolean |
setOrderCreateBillToData()
Gets all the bill-to data for WCS Order Create message. |
boolean |
setOrderCreateHeaderData()
Gets all the order header values for WCS Order Create message. |
boolean |
setOrderCreateItemData()
Gets all the order header values for WCS Order Create message. |
boolean |
setOrderCreatePurchaserData()
Gets all the purchaser data for WCS Order Create message. |
boolean |
setOrderCreateStoreData()
Gets all the store data for WCS Order Create message. |
boolean |
setOrderNVPValues()
Gets all the name value pairs for the WCS Order Create message. |
void |
setOrderRn(java.lang.Long anOrderRn)
Sets the order reference number used in the command. |
void |
setRequestProperties(TypedProperty aRequestProperties)
Sets the request properties as input for the command. |
boolean |
writeOrder()
Builds the WCS Order Create message. |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- The IBM copyright notice field.
- See Also:
- Constant Field Values
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.
ocProp
protected TypedProperty ocProp
- Used to provide data as input parms to doPreProcess() and doPostProcess()
MSGTYPE
public static final java.lang.Integer MSGTYPE
- Message type id for WCS Order Create message, which is 100.
SendWCSOrderCmdImpl
public SendWCSOrderCmdImpl()
doPostProcess
public boolean doPostProcess(TypedProperty aRequestProperty)
- Performs a additional processing after the command executes.
-
- Parameters:
- aRequestProperty - The request properties used by the command.
- Returns:
- true under the current implementation
doPreProcess
public boolean doPreProcess(TypedProperty aRequestProperty)
- Performs additional processing before the command executes.
-
- Parameters:
- aRequestProperty - The request properties used by the command.
- Returns:
- true under the current implementation
doProcess
public boolean doProcess()
- 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)
- Converts timestamp string to YYYYMMDD format.
-
- Parameters:
- str - the timestamp string
- Returns:
- the string with the date
getHeaderExtensionRecords
public java.lang.String getHeaderExtensionRecords()
- Implements 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.
-
- Returns:
- null under the current implementation.
getItemExtensionRecords
public java.lang.String getItemExtensionRecords()
- Implements 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.
-
- Returns:
- null under the current implementation.
getOrderMsg
public java.lang.StringBuffer getOrderMsg()
- Gets the order create message content built by the command.
-
- Returns:
- the StringBuffer object containing the order message.
getOrderRn
public java.lang.Long getOrderRn()
- 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)
- Converts timestamp string to HHMMSS format
-
- Parameters:
- str - the timestamp in String format
- Returns:
- the time string
isReadyToCallExecute
public boolean isReadyToCallExecute()
- Checks if the command is ready to call Execute.
-
- Overrides:
- isReadyToCallExecute in class AbstractECTargetableCommand
-
- Returns:
- true if the command is ready to call performExecute() method; false otherwise.
performExecute
public void performExecute()
throws ECException
- Executes the command by calling doPreProcess, doProcess and doPostProcess
-
- Specified by:
- performExecute in interface ECCommand
- Overrides:
- performExecute in class AbstractECTargetableCommand
-
- Throws:
- ECException
sendMessage
public boolean sendMessage()
- Sends the outbound order create message by doing the following: - Sets the content of the message. - Sends the message using outbound messaging system sendTransacted() service.
-
- Returns:
- true if the message was successfully sent; false otherwise.
setOrderCreateBillToData
public boolean setOrderCreateBillToData()
throws ECException
- Gets all the bill-to data for WCS Order Create message.
-
- Returns:
- true if no exception was encountered; false otherwise.
- Throws:
- ECException - Raised with ERR_CREATE_EXCEPTION when javax.ejb.CreateException exception is encountered. Raised with ERR_GENERIC when javax.naming.NamingException exception is encountered. Raised with ERR_REMOTE_EXCEPTION when java.rmi.RemoteException exception is encountered. Raised with ERR_OC_SUPPLIER_ERROR when javax.ejb.FinderException exception is encountered.
setOrderCreateHeaderData
public boolean setOrderCreateHeaderData()
throws ECException
- Gets all the order header values for WCS Order Create message.
-
- Returns:
- true if no exception was encountered; false otherwise.
- Throws:
- ECException - Raised with ERR_CREATE_EXCEPTION when javax.ejb.CreateException exception is encountered. Raised with ERR_GENERIC when javax.naming.NamingException exception is encountered. Raised with ERR_REMOTE_EXCEPTION when java.rmi.RemoteException exception is encountered. Raised with ERR_OC_SUPPLIER_ERROR when javax.ejb.FinderException exception is encountered.
setOrderCreateItemData
public boolean setOrderCreateItemData()
throws ECException
- Gets all the order header values for WCS Order Create message.
-
- Returns:
- true if no exception was encountered; false otherwise.
- Throws:
- ECException - Raised with ERR_CREATE_EXCEPTION when javax.ejb.CreateException exception is encountered. Raised with ERR_GENERIC when javax.naming.NamingException exception is encountered. Raised with ERR_REMOTE_EXCEPTION when java.rmi.RemoteException exception is encountered. Raised with ERR_OC_SUPPLIER_ERROR when javax.ejb.FinderException exception is encountered.
setOrderCreatePurchaserData
public boolean setOrderCreatePurchaserData()
throws ECException
- Gets all the purchaser data for WCS Order Create message.
-
- Returns:
- true if no exception was encountered; false otherwise.
- Throws:
- ECException - Raised with ERR_CREATE_EXCEPTION when javax.ejb.CreateException exception is encountered. Raised with ERR_GENERIC when javax.naming.NamingException exception is encountered. Raised with ERR_REMOTE_EXCEPTION when java.rmi.RemoteException exception is encountered. Raised with ERR_OC_SUPPLIER_ERROR when javax.ejb.FinderException exception is encountered.
setOrderCreateStoreData
public boolean setOrderCreateStoreData()
throws ECException
- Gets all the store data for WCS Order Create message.
-
- Returns:
- true if no exception was encountered; false otherwise.
- Throws:
- ECException - Raised with ERR_CREATE_EXCEPTION when javax.ejb.CreateException exception is encountered. Raised with ERR_GENERIC when javax.naming.NamingException exception is encountered. Raised with ERR_REMOTE_EXCEPTION when java.rmi.RemoteException exception is encountered. Raised with ERR_OC_SUPPLIER_ERROR when javax.ejb.FinderException exception is encountered.
setOrderNVPValues
public boolean setOrderNVPValues()
- Gets all the name value pairs for the WCS Order Create message.
-
- Returns:
- true if no exception was encountered; false otherwise.
setOrderRn
public void setOrderRn(java.lang.Long anOrderRn)
- 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
- Sets the request properties as input for the command.
-
- Parameters:
- aRequestProperties - The request properties object of the command.
- Throws:
- ECApplicationException
writeOrder
public boolean writeOrder()
- Builds the WCS Order Create message.
-
- Returns:
- true if no exception was encountered; false otherwise.
Feedback
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.