public class CSROrderProcessCmdImpl extends CSRBaseControllerCommandImpl implements CSROrderProcessCmd
This command calls the following Commands:
This command uses the following AccessBeans:
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static java.lang.String | NOTEBOOK_URL
The return url for a notebook widget.
|
static java.lang.String | WIZARD_URL
The return url for a wizard widget.
|
Constructor and Description |
---|
CSROrderProcessCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected void | addComments()
This method generates comments for order(s) and prepares email for notification.
|
protected void | checkOrderAdjustment()
Checks if order level adjustments are positive.
|
protected void | checkOrderPaymentAmountRemaining()
Checks if there's any remaining amount that is not allocated to a payment for this order.
|
protected void | exceptionUtil(TypedProperty prop, java.lang.Exception ex, java.lang.String methodName, java.lang.String cmdName, java.lang.String errMsg)
Common exception code for this command.
|
protected void | executeBackupOrderDelete()
Deletes backup order in database.
|
protected void | executeCSROrderAdjustmentUpdate()
This method calls CSROrderAdjustmentUpdateCmd to reprepare the order(s) if there are some manual adjustments.
|
protected void | executeCSROrderPrepare()
This method calls CSROrderPrepareCmd to prepare order(s).
|
protected void | executeOrderProcess(java.lang.String orderId, java.lang.String billingAddressId, java.util.Hashtable payment)
This method calls OrderProcessCmd to complete an order.
|
java.lang.String | getAdminId()
Returns the administrator's ID.
|
java.lang.String | getBackupOrderId()
Returns backup order ID.
|
java.util.Hashtable | getComment()
Returns comment as a Hashtable.
|
java.lang.String | getCustomerId()
Returns customer ID.
|
java.lang.String | getEditOrderInfo()
Returns "true" if it is called from an edit order notebook.
|
java.lang.String | getFirstBillingAddressId()
Returns first billing address ID.
|
java.lang.String | getFirstDirtyBit()
Returns the first order dirty status.
|
java.lang.String | getFirstOrderId()
Returns first order ID.
|
java.util.Hashtable | getFirstPayment()
Returns the payment information for the first order as a Hashtable.
|
java.util.Hashtable | getNLS()
Returns the properties containing all translatable messages for this command.
|
java.lang.String | getNotifyMerchant()
Gets notify merchant option.
|
java.lang.String | getNotifyOrderSubmitted()
Gets order submitted notification option.
|
java.lang.String | getNotifyShopper()
Gets notify customer option.
|
CommandContext | getOrgCmdContext()
Returns the original commandContext (administrator's command context).
|
java.lang.Integer | getOrgLangId()
Returns original language ID.
|
java.util.Locale | getOrgLocale()
Returns original locale.
|
TypedProperty | getOrgReqProperties()
Returns original request properties.
|
java.lang.String | getPoNumber()
Get the PO number
|
java.lang.String | getRedirectURL()
Returns the redirect URL that is to be executed after this controller command terminates.
|
AccessVector | getResources()
Gets the access vector accessed by this command.
|
java.lang.String | getSecondBillingAddressId()
Returns second billing address ID.
|
java.lang.String | getSecondOrderId()
Returns second order ID.
|
java.util.Hashtable | getSecondPayment()
Returns the payment information for the second order as a Hashtable.
|
protected java.lang.String | getSuccessMsg(java.util.Hashtable orderMgmtNLS)
Returns final success message.
|
java.lang.String | getXMLFile()
Returns XML file.
|
boolean | isBackupOrderDeleteError()
Returns error flag for deleting backup order error.
|
boolean | isEmailError()
Returns error flag for email comment error.
|
protected boolean | isEmptyOrder(java.lang.String orderRefNum)
Determines if an order has order items or not.
|
boolean | isFirstOrderExist()
Returns true if the first order exits.
|
boolean | isSecondOrderExist()
Returns true if the Second order exits.
|
void | performExecute()
This method performs the execution for process the new order(s) and cancel old order if necessary.
|
protected void | removePaymentInfo(java.lang.Long orderId)
When editing an order, remove the original payment for the first order.
|
protected void | removePrevPayment()
When editing an order, remove the original payment for the first order.
|
void | reset()
This method should be called after a command has been executed to reset its states variables.
|
protected void | setAdminId(java.lang.String newAdminId)
Set administrator's ID.
|
protected void | setBackupOrderDeleteError(boolean newBackupOrderDeleteError)
Set setBackupOrderDeleteError flag.
|
protected void | setBackupOrderId(java.lang.String newBackupOrderId)
Sets backup order ID.
|
protected void | setComment(java.util.Hashtable newComment)
Sets comment.
|
protected void | setCustomerId(java.lang.String newCustomerId)
Sets customer ID.
|
protected void | setEditOrderInfo(java.lang.String newEditOrderInfo)
Sets "true" if it is edit order info notebook.
|
protected void | setEmailError(boolean newEmailError)
Sets "true" if there is an email error.
|
protected void | setFirstBillingAddressId(java.lang.String newBillingAddressId)
Sets first billing address ID.
|
protected void | setFirstDirtyBit(java.lang.String newFirstDirtyBit)
Sets "true" if there are some adjustments in the first order, "false" if not.
|
protected void | setFirstOrderExist(boolean newFirstOrderExist)
Sets if there are some order items in first order.
|
protected void | setFirstOrderId(java.lang.String newFirstOrderId)
Sets first order ID.
|
protected void | setFirstPayment(java.util.Hashtable newPayment)
Sets first payment information.
|
protected void | setIsSecondOrderExist(boolean newIsSecondOrderExist)
Sets if there are some order items in second order.
|
protected void | setNLS(java.util.Hashtable newNLS)
Sets NLS properties.
|
void | setNotifyMerchant(java.lang.String notifyMerchant)
Sets notify merchant option.
|
void | setNotifyOrderSubmitted(java.lang.String notifyOrderSubmitted)
Sets order submitted notification option.
|
void | setNotifyShopper(java.lang.String notifyShopper)
Sets notify customer option.
|
protected void | setOrgCmdContext(CommandContext newOrgCmdContext)
Sets original commandContext.
|
protected void | setOrgLangId(java.lang.Integer newOrgLangId)
Sets the original language ID.
|
protected void | setOrgLocale(java.util.Locale newOrgLocale)
Sets original locale.
|
protected void | setOrgReqProperties(TypedProperty newOrgReqProperties)
Sets original request properties.
|
void | setPoNumber(java.lang.String string)
Set the PO number
|
protected void | setRedirectURL(java.lang.String newRedirectURL)
Sets redirect URL.
|
protected void | setSecondBillingAddressId(java.lang.String newBillingAddressId)
Sets second billing address ID.
|
protected void | setSecondOrderExist(boolean newSecondOrderExist)
Sets second order exist flag.
|
protected void | setSecondOrderId(java.lang.String newSecondOrderId)
Sets second order ID.
|
protected void | setSecondPayment(java.util.Hashtable newPayment)
Sets second payment information.
|
protected void | setSuccessMsg(java.lang.String newSuccessMsg)
Sets final success message.
|
protected void | setXMLFile(java.lang.String newXMLFile)
Sets XML file.
|
void | validateParameters()
This method gets XMLObject from the GUI Notebook or Wizard and get ready to parse it.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String NOTEBOOK_URL
public static final java.lang.String WIZARD_URL
protected void addComments() throws ECException
protected void checkOrderAdjustment() throws ECApplicationException
protected void exceptionUtil(TypedProperty prop, java.lang.Exception ex, java.lang.String methodName, java.lang.String cmdName, java.lang.String errMsg) throws ECApplicationException
protected void executeBackupOrderDelete() throws java.lang.Exception
protected void executeCSROrderAdjustmentUpdate() throws ECException
protected void executeCSROrderPrepare() throws ECException
protected void executeOrderProcess(java.lang.String orderId, java.lang.String billingAddressId, java.util.Hashtable payment) throws ECException
public java.lang.String getAdminId()
public java.lang.String getBackupOrderId()
public java.util.Hashtable getComment()
public java.lang.String getCustomerId()
public java.lang.String getEditOrderInfo()
public java.lang.String getFirstBillingAddressId()
public java.lang.String getFirstDirtyBit()
public java.lang.String getFirstOrderId()
public java.util.Hashtable getFirstPayment()
public java.util.Hashtable getNLS()
public CommandContext getOrgCmdContext()
public java.lang.Integer getOrgLangId()
public java.util.Locale getOrgLocale()
public TypedProperty getOrgReqProperties()
public java.lang.String getRedirectURL()
public AccessVector getResources() throws ECException
public java.lang.String getSecondBillingAddressId()
public java.lang.String getSecondOrderId()
public java.util.Hashtable getSecondPayment()
protected java.lang.String getSuccessMsg(java.util.Hashtable orderMgmtNLS)
public java.lang.String getXMLFile()
public boolean isBackupOrderDeleteError()
public boolean isEmailError()
protected boolean isEmptyOrder(java.lang.String orderRefNum) throws java.lang.Exception
public boolean isFirstOrderExist()
public boolean isSecondOrderExist()
public void performExecute() throws ECException
protected void removePrevPayment() throws ECApplicationException
protected void removePaymentInfo(java.lang.Long orderId) throws ECApplicationException
protected void setAdminId(java.lang.String newAdminId)
protected void setBackupOrderDeleteError(boolean newBackupOrderDeleteError)
protected void setBackupOrderId(java.lang.String newBackupOrderId)
protected void setComment(java.util.Hashtable newComment)
protected void setCustomerId(java.lang.String newCustomerId)
protected void setEditOrderInfo(java.lang.String newEditOrderInfo)
protected void setEmailError(boolean newEmailError)
protected void setFirstBillingAddressId(java.lang.String newBillingAddressId)
protected void setFirstDirtyBit(java.lang.String newFirstDirtyBit)
protected void setFirstOrderExist(boolean newFirstOrderExist)
protected void setFirstOrderId(java.lang.String newFirstOrderId)
protected void setFirstPayment(java.util.Hashtable newPayment)
protected void setIsSecondOrderExist(boolean newIsSecondOrderExist)
protected void setNLS(java.util.Hashtable newNLS)
protected void setOrgCmdContext(CommandContext newOrgCmdContext)
protected void setOrgLangId(java.lang.Integer newOrgLangId)
protected void setOrgLocale(java.util.Locale newOrgLocale)
protected void setOrgReqProperties(TypedProperty newOrgReqProperties)
protected void setRedirectURL(java.lang.String newRedirectURL)
protected void setSecondBillingAddressId(java.lang.String newBillingAddressId)
protected void setSecondOrderExist(boolean newSecondOrderExist)
protected void setSecondOrderId(java.lang.String newSecondOrderId)
protected void setSecondPayment(java.util.Hashtable newPayment)
protected void setSuccessMsg(java.lang.String newSuccessMsg)
protected void setXMLFile(java.lang.String newXMLFile)
public void validateParameters() throws ECApplicationException
public java.lang.String getNotifyMerchant()
public void setNotifyMerchant(java.lang.String notifyMerchant)
public java.lang.String getNotifyShopper()
public void setNotifyShopper(java.lang.String notifyShopper)
public java.lang.String getNotifyOrderSubmitted()
public void setNotifyOrderSubmitted(java.lang.String notifyOrderSubmitted)
protected void checkOrderPaymentAmountRemaining() throws ECApplicationException
public java.lang.String getPoNumber()
public void setPoNumber(java.lang.String string)
public void reset()