public class SendWCSOrderCmdImpl extends TaskCommandImpl implements OrderMessagingCmd
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COPYRIGHT
The IBM copyright notice field.
|
static java.lang.Integer |
MSGTYPE
Deprecated.
This field is replaced by
MSGTYPENAME. |
static java.lang.String |
MSGTYPENAME
Message type name for WebSphere Commerce OrderCreateFixFormat message.
|
TypedProperty |
orderNVP
Used to hold temporary name-value pairs for order information
retrieved from database to use when building the message.
|
defaultCommandClassName, NAME| Constructor and Description |
|---|
SendWCSOrderCmdImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
doPostProcess(TypedProperty aRequestProperty)
This method performs additional processing after the command runs.
|
boolean |
doPreProcess(TypedProperty aRequestProperty)
This method performs additional processing before the command runs.
|
boolean |
doProcess()
This method gets the order information, builds the OrderCreateFixFormat message and sends the message.
|
java.lang.String |
getDate(java.lang.String str)
This method converts timestamp string to
|
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.StringBuffer |
getOrderMsg()
This method gets the OrderCreateFixFormat message content built by the command.
|
java.lang.Long |
getOrderRn()
This method gets the order reference number passed to this command.
|
java.lang.String |
getTime(java.lang.String str)
This method converts timestamp string to
|
boolean |
isReadyToCallExecute()
This method checks if the command is ready to call
Execute. |
void |
performExecute()
This method executes the command by calling
doPreProcess, doProcess and doPostProcess |
boolean |
sendMessage()
This method sends the outbound OrderCreateFixFormat message by doing the following:
|
void |
setException(java.lang.Exception e)
Sets the execution exception when it happens.
|
boolean |
setOrderCreateBillToData()
This method gets all the bill-to data for WebSphere Commerce OrderCreateFixFormat message.
|
boolean |
setOrderCreateHeaderData()
This method gets all the order header values for WebSphere Commerce OrderCreateFixFormat message.
|
boolean |
setOrderCreateItemData()
This method gets all the order header values for WebSphere Commerce OrderCreateFixFormat message.
|
boolean |
setOrderCreatePurchaserData()
This method gets all the purchaser data for WebSphere Commerce OrderCreateFixFormat message.
|
boolean |
setOrderCreateStoreData()
This method gets all the store data for the WebSphere Commerce OrderCreateFixFormat message.
|
void |
setOrderMsg(java.lang.StringBuffer anOrderMsg)
This method sets the OrderCreateFixFormat message content.
|
boolean |
setOrderNVPValues()
This method gets all the name-value pairs for the WebSphere Commerce OrderCreateFixFormat message.
|
void |
setOrderRn(java.lang.Long anOrderRn)
This method sets the order reference number used in the command.
|
void |
setRequestProperties(TypedProperty aRequestProperties)
This method sets the request properties as input for the command.
|
boolean |
writeOrder()
This method builds the WebSphere Commerce OrderCreateFixFormat message.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParametersexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCachegetCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicyequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCachegetCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputPropertiescheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameterspublic static final java.lang.String COPYRIGHT
public TypedProperty orderNVP
public static final java.lang.Integer MSGTYPE
MSGTYPENAME.public static final java.lang.String MSGTYPENAME
public boolean doPostProcess(TypedProperty aRequestProperty)
aRequestProperty - The request properties used by the command.public boolean doPreProcess(TypedProperty aRequestProperty)
aRequestProperty - The request properties used by the command.public boolean doProcess()
public java.lang.String getDate(java.lang.String str)
YYYYMMDDformat.
str - the timestamp stringpublic java.lang.String getHeaderExtensionRecords()
public java.lang.String getItemExtensionRecords()
public java.lang.StringBuffer getOrderMsg()
public java.lang.Long getOrderRn()
getOrderRn in interface OrderMessagingCmdpublic java.lang.String getTime(java.lang.String str)
HHMMSSformat
str - the timestamp in String formatpublic boolean isReadyToCallExecute()
Execute.isReadyToCallExecute in interface com.ibm.websphere.command.CommandisReadyToCallExecute in class AbstractECTargetableCommandperformExecute() method; false
otherwise.public void performExecute()
throws ECException
doPreProcess, doProcess and doPostProcessperformExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommandECExceptionpublic boolean sendMessage()
- Sets the content of the message.
- Sends the message using outbound messaging system sendTransacted() service.
public boolean setOrderCreateBillToData()
throws ECException
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.public boolean setOrderCreateHeaderData()
throws ECException
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.public boolean setOrderCreateItemData()
throws ECException
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.public boolean setOrderCreatePurchaserData()
throws ECException
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.public boolean setOrderCreateStoreData()
throws ECException
ECException - raised with:
ERR_CREATE_EXCEPTION when javax.ejb.CreateException exception is encountered.
ERR_GENERIC when javax.naming.NamingException exception is encountered.
ERR_REMOTE_EXCEPTION when java.rmi.RemoteException exception is encountered.
ERR_OC_SUPPLIER_ERROR when javax.ejb.FinderException exception is encountered.public boolean setOrderNVPValues()
public void setOrderRn(java.lang.Long anOrderRn)
setOrderRn in interface OrderMessagingCmdanOrderRn - The order reference number.public void setOrderMsg(java.lang.StringBuffer anOrderMsg)
writeOrder()public void setRequestProperties(TypedProperty aRequestProperties) throws ECApplicationException
aRequestProperties - The request properties object of the command.ECApplicationExceptionpublic boolean writeOrder()
setOrderMsg(StringBuffer) if setOrderMsg(StringBuffer) is customized.setOrderMsg(StringBuffer)public void setException(java.lang.Exception e)
ex - The exception thrown when the logic of this class executes.