|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl | +--com.ibm.commerce.tools.command.ToolsControllerCommandImpl | +--com.ibm.commerce.tools.optools.order.commands.CSRBaseControllerCommandImpl | +--com.ibm.commerce.tools.optools.order.commands.CSROrderProcessCmdImpl
If the process is creating order(finish action in the Place Order wizard), this command will first do the adjustments by calling CSROrderAdustmentUpdateCmd if applicable, then process the pending order(s) and complete the order(s) by calling OrderProcessCmd, finally add comments. If the process is editing old order(ok button in the Change Order notebook), this command will do the order prepare by calling CSROrderPrepareCmd if it's needed, then process the order and complete the original Order by calling OrderProcessCmd, finally add comments and delete the backup order.
Field Summary | |
static java.lang.String |
COPYRIGHT
|
static java.lang.String |
NOTEBOOK_URL
|
static java.lang.String |
WIZARD_URL
|
Fields inherited from class com.ibm.commerce.command.ControllerCommandImpl |
requestProperties, responseProperties, retriable, viewReqProperties |
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.tools.optools.order.commands.CSROrderProcessCmd |
defaultCommandClassName, NAME |
Constructor Summary | |
CSROrderProcessCmdImpl()
|
Method Summary | |
protected void |
addComments()
This method generates comments for order(s) and prepares email for notification. |
protected void |
checkOrderAdjustment()
Check if order level adjustments are positive. |
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()
Delete 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 call 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()
Return the administrator's ID. |
java.lang.String |
getBackupOrderId()
Return backup order ID. |
java.util.Hashtable |
getComment()
Return comment as a Hashtable. |
java.lang.String |
getCustomerId()
Return customer ID. |
java.lang.String |
getEditOrderInfo()
|
java.lang.String |
getFirstBillingAddressId()
Return first billing address ID. |
java.lang.String |
getFirstDirtyBit()
|
java.lang.String |
getFirstOrderId()
Return first order ID. |
java.util.Hashtable |
getFirstPayment()
Return the payment information for the first order as a Hashtable. |
java.util.Hashtable |
getNLS()
Return the properties containing all translatable messages for this command. |
CommandContext |
getOrgCmdContext()
Returns the original commandContext (administrator's command context). |
java.lang.Integer |
getOrgLangId()
Return original language ID. |
java.util.Locale |
getOrgLocale()
Return original locale. |
TypedProperty |
getOrgReqProperties()
Return original request properties. |
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()
Return second billing address ID. |
java.lang.String |
getSecondOrderId()
Return second order ID. |
java.util.Hashtable |
getSecondPayment()
Return the payment information for the second order as a Hashtable. |
protected java.lang.String |
getSuccessMsg(java.util.Hashtable orderMgmtNLS)
Return final success message. |
java.lang.String |
getXMLFile()
Return XML file. |
boolean |
isBackupOrderDeleteError()
|
boolean |
isEmailError()
|
protected boolean |
isEmptyOrder(java.lang.String orderRefNum)
Determines if an order has order items or not. |
boolean |
isFirstOrderExist()
|
boolean |
isSecondOrderExist()
|
void |
performExecute()
This method performs the execution for process the new order(s) and cancel old order if neccessary. |
protected void |
removePrevPayment()
When editing an order, remove the original payment for the first order. |
protected void |
setAdminId(java.lang.String newAdminId)
Set administrator's ID. |
protected void |
setBackupOrderDeleteError(boolean newBackupOrderDeleteError)
|
protected void |
setBackupOrderId(java.lang.String newBackupOrderId)
Set backup order ID. |
protected void |
setComment(java.util.Hashtable newComment)
Set comment. |
protected void |
setCustomerId(java.lang.String newCustomerId)
Set customer ID. |
protected void |
setEditOrderInfo(java.lang.String newEditOrderInfo)
Set "true" if it is edit order info notebook. |
protected void |
setEmailError(boolean newEmailError)
|
protected void |
setFirstBillingAddressId(java.lang.String newBillingAddressId)
Set first billing address ID. |
protected void |
setFirstDirtyBit(java.lang.String newFirstDirtyBit)
Set "true" if there are some adjustments in the first order, "false" if not. |
protected void |
setFirstOrderExist(boolean newFirstOrderExist)
|
protected void |
setFirstOrderId(java.lang.String newFirstOrderId)
Set first order ID. |
protected void |
setFirstPayment(java.util.Hashtable newPayment)
Set first payment information. |
protected void |
setIsSecondOrderExist(boolean newIsSecondOrderExist)
|
protected void |
setNLS(java.util.Hashtable newNLS)
Set NLS properties. |
protected void |
setOrgCmdContext(CommandContext newOrgCmdContext)
Set original commandContext. |
protected void |
setOrgLangId(java.lang.Integer newOrgLangId)
Set the original language ID. |
protected void |
setOrgLocale(java.util.Locale newOrgLocale)
Set original locale. |
protected void |
setOrgReqProperties(TypedProperty newOrgReqProperties)
Set original request properties. |
protected void |
setRedirectURL(java.lang.String newRedirectURL)
Set redirect URL. |
protected void |
setSecondBillingAddressId(java.lang.String newBillingAddressId)
Set second billing address ID. |
protected void |
setSecondOrderExist(boolean newSecondOrderExist)
|
protected void |
setSecondOrderId(java.lang.String newSecondOrderId)
Set second order ID. |
protected void |
setSecondPayment(java.util.Hashtable newPayment)
Set second payment information. |
protected void |
setSuccessMsg(java.lang.String newSuccessMsg)
Set final success message. |
protected void |
setXMLFile(java.lang.String newXMLFile)
Set XML file. |
void |
validateParameters()
This method gets XMLObject from the GUI Notebook or Wizard and get ready to parse it. |
Methods inherited from class com.ibm.commerce.tools.optools.order.commands.CSRBaseControllerCommandImpl |
callPreCommands, findCmdInterfaceName, getIfExePreCmdChains, getPreCmdChain, setIfExePreCmdChains, setPreCmdChain |
Methods inherited from class com.ibm.commerce.tools.command.ToolsControllerCommandImpl |
getViewInputProperties, setRequestProperties |
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl |
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.AccCommand |
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from interface com.ibm.commerce.security.Protectable |
fulfills, getOwner |
Field Detail |
public static final java.lang.String COPYRIGHT
public static final java.lang.String NOTEBOOK_URL
public static final java.lang.String WIZARD_URL
Constructor Detail |
public CSROrderProcessCmdImpl()
Method Detail |
protected void addComments() throws ECException
ECApplicationException
- protected void checkOrderAdjustment() throws ECApplicationException
ECApplicationException
- protected void exceptionUtil(TypedProperty prop, java.lang.Exception ex, java.lang.String methodName, java.lang.String cmdName, java.lang.String errMsg) throws ECApplicationException
prop
- The response typed property.ex
- The catched exception.methodName
- The name of the method with exception.cmdName
- The name of the command.errMsg
- The translated error message string.ECApplicationException
- The exception to be sent to the
error handling view.protected void executeBackupOrderDelete() throws java.lang.Exception
java.lang.Exception
- protected void executeCSROrderAdjustmentUpdate() throws ECException
ECException
- protected void executeCSROrderPrepare() throws ECException
ECException
- The exception description.protected void executeOrderProcess(java.lang.String orderId, java.lang.String billingAddressId, java.util.Hashtable payment) throws ECException
orderId
- The order ID to process.billingAddressId
- The address ID used for this order.payment
- The payment name-value pairs for this order.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
getResources
in interface ECCommand
getResources
in class AbstractECTargetableCommand
public java.lang.String getSecondBillingAddressId()
public java.lang.String getSecondOrderId()
public java.util.Hashtable getSecondPayment()
protected java.lang.String getSuccessMsg(java.util.Hashtable orderMgmtNLS)
orderMgmtNLS
- The hashtable with the translated messages.public java.lang.String getXMLFile()
public boolean isBackupOrderDeleteError()
public boolean isEmailError()
protected boolean isEmptyOrder(java.lang.String orderRefNum) throws java.lang.Exception
orderRefNum
- An order ID.java.lang.Exception
- The exception description.public boolean isFirstOrderExist()
public boolean isSecondOrderExist()
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in class AbstractECTargetableCommand
ECException
- protected void removePrevPayment() throws ECApplicationException
ECApplicationException
- protected void setAdminId(java.lang.String newAdminId)
newAdminId
- The administrator's ID.protected void setBackupOrderDeleteError(boolean newBackupOrderDeleteError)
newBackupOrderDeleteError
- Set true if there is an error to delete a backup order, false if no delete error.protected void setBackupOrderId(java.lang.String newBackupOrderId)
newBackupOrderId
- The backup order ID for the first order.protected void setComment(java.util.Hashtable newComment)
newComment
- The hashtable containing the comment details.protected void setCustomerId(java.lang.String newCustomerId)
newCustomerId
- The customer ID.protected void setEditOrderInfo(java.lang.String newEditOrderInfo)
newEditOrderInfo
- protected void setEmailError(boolean newEmailError)
newEmailError
- Set true if there is an email error, false if no email error.protected void setFirstBillingAddressId(java.lang.String newBillingAddressId)
newBillingAddressId
- The billing address ID of the first order.protected void setFirstDirtyBit(java.lang.String newFirstDirtyBit)
newFirstDirtyBit
- protected void setFirstOrderExist(boolean newFirstOrderExist)
newFirstOrderExist
- Set true if there are some order items in first order.protected void setFirstOrderId(java.lang.String newFirstOrderId)
newFirstOrderId
- The first order ID.protected void setFirstPayment(java.util.Hashtable newPayment)
newPayment
- The name-value pairs with the first order payment information.protected void setIsSecondOrderExist(boolean newIsSecondOrderExist)
newIsSecondOrderExist
- Set true if there are some order items in second order.protected void setNLS(java.util.Hashtable newNLS)
newNLS
- The name-value pairs containing the messages to be used
by this command.protected void setOrgCmdContext(CommandContext newOrgCmdContext)
newOrgCmdContext
- The original command context (admin command context).protected void setOrgLangId(java.lang.Integer newOrgLangId)
newOrgLangId
- The original language ID.protected void setOrgLocale(java.util.Locale newOrgLocale)
newOrgLocale
- The locale from the original command context.protected void setOrgReqProperties(TypedProperty newOrgReqProperties)
newOrgReqProperties
- The original request properties.protected void setRedirectURL(java.lang.String newRedirectURL)
newRedirectURL
- The name of the redirect page.protected void setSecondBillingAddressId(java.lang.String newBillingAddressId)
newBillingAddressId
- The billing address ID of the second order.protected void setSecondOrderExist(boolean newSecondOrderExist)
newSecondOrderExist
- Set true if there are some order items in second order.protected void setSecondOrderId(java.lang.String newSecondOrderId)
newSecondOrderId
- The second order ID.protected void setSecondPayment(java.util.Hashtable newPayment)
newPayment
- The name-value pairs with the second order payment information.protected void setSuccessMsg(java.lang.String newSuccessMsg)
newSuccessMsg
- The translated success message for the order(s).protected void setXMLFile(java.lang.String newXMLFile)
newXMLFile
- The XML file used.public void validateParameters() throws ECApplicationException
validateParameters
in interface ECCommand
validateParameters
in class CSRBaseControllerCommandImpl
ECException
- If cannot parse the XMLObject, throw ECApplicationException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |