public class ProcessOrderCmdImpl extends TaskCommandImpl implements ProcessOrderCmd
ProcessOrderCmd.
Behaviour
PreProcessOrderCmd.mergeShopperPayInfo(OrderAccessBean)
to merge the payment info for this order.handleOrderFraud(OrderAccessBean) to detect any fraud order.checkOrderAndItemTotals()
to perform validation on order totals and order Item totals.DoInventoryActionCmd with action ALLOCATE_INVENTORY to update inventory.getInitialAmount() to retrieve the initial payment amount used for Payment
actions during EDP PrimePayment. If it’s bigger than order total, throw exception.UpdateSpendingLimitCmd to check the trading agreement spending limit and validate the PO number
PrimePaymentCmd is invoked to process the payment information associated with the order.paymentAndReleaseRelationshipEnabled() to get to know whether
the feature of "build relationship between payment and release" is enabled.
If so, put the order items which would be processed by payment into the request properties.RaiseOrderSubmitEventCmd to raise the order submit event.CalculationHelper to finalize calculation usages.OrdersMgpPersistListener is enabled,
call PersistOrdersWithMemberGroupIdsForCurrentUserCmd
to persist the order id with the member group id.ExtOrderProcessCmd to execute customization logic.TransferOrderCmd to transfer the order to external system if needed.OrderMessagingCmd to generate the outbound Order Create Message.NotificationHelper to notify shopper that an order is received.PreProcessOrderCmdDoInventoryActionCmdUpdateSpendingLimitCmdPrimePaymentCmdRaiseOrderSubmitEventCmdPersistOrdersWithMemberGroupIdsForCurrentUserCmdExtOrderProcessCmdTransferOrderCmdOrderMessagingCmdOrderAccessBeanOrderItemAccessBeanOrderOptionAccessBeanOrderReleaseAccessBeanBuyerPurchaseOrderAccessBeanStoreQuoteConfigurationAccessBeanUserAccessBeanOrderQuotationRelAccessBeanProcessBackordersCmdImplProcessFutureOrdersCmdImplBatchOrderRequestCmdImplOrderProcessCmdImplOrderProcessPostApprovalCmdImpldefaultCommandClassName, NAME, VAL_NOTIFY_NO, VAL_NOTIFY_YES| Constructor and Description |
|---|
ProcessOrderCmdImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
createOrderLineAuditRecord()
Create an audit record which stores the count of order items in this order.
|
java.lang.String |
getAvailabilityChangeURL()
This method gets the URL to redirect to when the estimated availability time plus the
shipping offset is more than the time interval.
|
java.lang.Long |
getBillToRn()
Gets the reference number of the address to bill.
|
java.lang.String |
getExternalPassword()
Gets the external password
|
java.lang.String |
getExternalUserId()
Gets the external user id
|
java.lang.Integer |
getField1()
Gets merchant-customizable field one.
|
java.math.BigDecimal |
getField2()
Gets merchant-customizable field two.
|
java.lang.String |
getField3()
Gets merchant-customizable field three.
|
java.lang.Long |
getMaxAvailabilityChange()
Gets the time interval, in seconds, used with the url set by the
setAvailabilityChangeURL method.
|
java.lang.String |
getNoInventoryURL()
Gets the URL to redirect to if any of the order items in the order cannot be
allocated or backordered.
|
java.util.Hashtable |
getNotificationAttributes()
This method gets the attributes for order notification
|
java.lang.Short |
getNotifyMerchant()
Determines whether the store should be notified when the order processing is
complete.
|
java.lang.Short |
getNotifyOrderSubmitted()
Determines whether the customer should be notified when the order is successfully
submitted for processing.
|
java.lang.Short |
getNotifyShopper()
Determines whether the customer should be notified when the order processing is
complete.
|
OrderAccessBean |
getOrder()
This method returns the order specified.
|
java.lang.Long |
getOrderRn()
Gets the order reference number.
|
java.lang.String |
getPoNumber()
This method gets the parameter PO number
|
java.lang.String |
getQuotationSubmission()
Gets the quotationSubmission parameter.
|
java.lang.String |
getQuoteExpiredURL()
Gets the URL to redirect to if the order total expired in agreement with the
expiry policy set by the setQuoteExpiryPolicy method.
|
java.lang.String |
getQuoteExpiryPolicy()
Gets the policy which determines the command behaviour if the order total expires or an order item's fulfillment
center changes during inventory allocation.
|
java.lang.String |
getReduceParentQuantities()
Gets the reduceParentQuantities parameter.
|
TypedProperty |
getResponseProperties()
Gets the response properties object for the calling controller command to use.
|
boolean |
isReadyToCallExecute()
Checks the validity of the parameters
|
void |
performExecute()
This method performs the business logic of the command.
|
void |
reset()
This method should be called after a command has been executed to reset its states variables.
|
void |
setAvailabilityChangeURL(java.lang.String newAvailabilityChangeURL)
This method sets the URL to redirect to when the estimated availability time plus the
shipping offset is more than the time interval.
|
void |
setBillToRn(java.lang.Long anBillToRn)
This method sets the reference number of the address to bill.
|
void |
setExternalPassword(java.lang.String astrExternalPassword)
Sets the external password
|
void |
setExternalUserId(java.lang.String astrExternalUserId)
Sets the external user id
|
void |
setField1(java.lang.Integer anField1)
This method sets merchant-customizable field one.
|
void |
setField2(java.math.BigDecimal adField2)
This method sets merchant-customizable field two.
|
void |
setField3(java.lang.String astrField3)
This method sets merchant-customizable field three.
|
void |
setMaxAvailabilityChange(java.lang.Long newMaxAvailabilityChange)
This method sets the time interval, in seconds, used with the url set by the
setAvailabilityChangeURL method.
|
void |
setNoInventoryURL(java.lang.String newNoInventoryURL)
This method sets the URL to redirect to if any of the order items in the order cannot be
allocated or backordered.
|
void |
setNotificationAttributes(java.util.Hashtable aNotificationAttributes)
This method sets the attributes for order notification
|
void |
setNotifyMerchant(java.lang.Short newNotifyMerchant)
This method specifies whether to notify the merchant when the order has been processed.
|
void |
setNotifyOrderSubmitted(java.lang.Short newNotifyOrderSubmitted)
This method specifies whether the customer should be notified when the order is successfully
submitted for processing.
|
void |
setNotifyShopper(java.lang.Short newNotifyShopper)
This method specifies whether to notify the shopper when the order has been processed.
|
void |
setOrderRn(java.lang.Long anOrderRn)
This method sets the order reference number.
|
void |
setPoNumber(java.lang.String argPoNumber)
This method sets the parameter PO number
|
void |
setQuotationSubmission(java.lang.String astrQuotationSubmission)
This method sets the quotationSubmission parameter.
|
void |
setQuoteExpiredURL(java.lang.String newQuoteExpiredURL)
This method sets the URL to redirect to if the order total expired in agreement with the
expiry policy set by the setQuoteExpiryPolicy method.
|
void |
setQuoteExpiryPolicy(java.lang.String newQuoteExpiryPolicy)
This method sets the behavior of the command if the order total expires or an order item's fulfillment
center changes during inventory allocation.
|
void |
setReduceParentQuantities(java.lang.String astrReduceParentQuantities)
This method sets the reduceParentQuantities parameter.
|
void |
setRequestProperties(TypedProperty aRequestProperties)
This method sets request Properties.
|
void |
setResponseProperties(TypedProperty aResponseProperties)
This method sets the response properties object for the calling controller command to use.
|
void |
setTransferMode(java.lang.String transferMode)
This method sets the transferMode property of the command.
|
void |
validateOrderPITotalAmount()
Check if PI total amount matches order total amount.
|
void |
validateParameters()
This method performs server side parameter checking.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiesexecuteFromCache, 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, setDefaultPropertiespublic java.lang.String getAvailabilityChangeURL()
public java.lang.Long getBillToRn()
public java.lang.Integer getField1()
public java.math.BigDecimal getField2()
public java.lang.String getField3()
public java.lang.Long getMaxAvailabilityChange()
public java.lang.String getNoInventoryURL()
public java.lang.Short getNotifyMerchant()
public java.lang.Short getNotifyOrderSubmitted()
public java.lang.Short getNotifyShopper()
public java.lang.String getQuotationSubmission()
public java.lang.Long getOrderRn()
public java.lang.String getExternalUserId()
public void setExternalUserId(java.lang.String astrExternalUserId)
setExternalUserId in interface ProcessOrderCmdastrExternalUserId - The external user id to setpublic java.lang.String getExternalPassword()
public void setExternalPassword(java.lang.String astrExternalPassword)
setExternalPassword in interface ProcessOrderCmdastrExternalPassword - The external password to setpublic java.lang.String getQuoteExpiredURL()
public java.lang.String getQuoteExpiryPolicy()
public java.lang.String getReduceParentQuantities()
public TypedProperty getResponseProperties()
getResponseProperties in interface ProcessOrderCmdpublic boolean isReadyToCallExecute()
isReadyToCallExecute in interface com.ibm.websphere.command.CommandisReadyToCallExecute in class AbstractECTargetableCommandpublic void validateOrderPITotalAmount()
throws ECException,
javax.persistence.NoResultException
ECExceptionjavax.persistence.NoResultExceptionpublic void createOrderLineAuditRecord()
throws javax.persistence.NoResultException,
javax.naming.NamingException,
java.sql.SQLException
javax.persistence.NoResultExceptionjavax.naming.NamingExceptionjava.sql.SQLExceptionpublic void performExecute()
throws ECException
PreProcessOrderCmd.
If UBF is not enabled, it calls mergeShopperPayInfo(OrderAccessBean)
to merge the payment info for this order.
It calls handleOrderFraud(OrderAccessBean) to detect any fraud order.
It then configures the order notification and calls checkOrderAndItemTotals()
to perform validation on order totals and order Item totals.
It calls DoInventoryActionCmd with action ALLOCATE_INVENTORY to update inventory.
It calls getInitialAmount() to retrieve the initial payment amount used for Payment
actions during EDP PrimePayment. If it’s bigger than order total, throw exception.
It calls UpdateSpendingLimitCmd to check the trading agreement spending limit and validate the PO number
PrimePaymentCmd is invoked to process the payment information associated with the order.
It also calls paymentAndReleaseRelationshipEnabled() to get to know whether
the feature of "build relationship between payment and release" is enabled.
If so, put the order items which would be processed by payment into the request properties.
Then it calls RaiseOrderSubmitEventCmd to raise the order submit event.
The orderstate will be updated based on the inventory status.
It calls CalculationHelper to finalize calculation usages.
It updates the status of the order and the order items accordingly.
It configures the notification attributes so that an email notification can be sent.
If OrdersMgpPersistListener is enabled, it calls PersistOrdersWithMemberGroupIdsForCurrentUserCmd
to persist the order id with the member group id.
It then calls ExtOrderProcessCmd to execute customization logic.
It validates the order inventory status. If backorder is not allowed and one of the items
in the order is backordered, throw exception.
It calls TransferOrderCmd to transfer the order to external system if needed.
It calls OrderMessagingCmd to generate the outbound Order Create Message.
Finally it calls notifyShopper(Integer), which calls NotificationHelper
to notify shopper that an order is received.performExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommandECException - for failurespublic void reset()
reset in interface com.ibm.websphere.command.Commandreset in class AbstractECTargetableCommandpublic void setAvailabilityChangeURL(java.lang.String newAvailabilityChangeURL)
setAvailabilityChangeURL in interface ProcessOrderCmdnewAvailabilityChangeURL - URLpublic void setBillToRn(java.lang.Long anBillToRn)
setBillToRn in interface ProcessOrderCmdanBillToRn - address id.public void setField1(java.lang.Integer anField1)
setField1 in interface ProcessOrderCmdanField1 - field1public void setField2(java.math.BigDecimal adField2)
setField2 in interface ProcessOrderCmdadField2 - field2public void setField3(java.lang.String astrField3)
setField3 in interface ProcessOrderCmdastrField3 - field3public void setMaxAvailabilityChange(java.lang.Long newMaxAvailabilityChange)
setMaxAvailabilityChange in interface ProcessOrderCmdnewMaxAvailabilityChange - time intervalpublic void setNoInventoryURL(java.lang.String newNoInventoryURL)
setNoInventoryURL in interface ProcessOrderCmdnewNoInventoryURL - URLpublic void setNotifyMerchant(java.lang.Short newNotifyMerchant)
setNotifyMerchant in interface ProcessOrderCmdnewNotifyMerchant - notify merchant parameterpublic void setNotifyOrderSubmitted(java.lang.Short newNotifyOrderSubmitted)
1=Yes
0=No (default)
setNotifyOrderSubmitted in interface ProcessOrderCmdnewNotifyOrderSubmitted - notify order submitted parameter.public void setNotifyShopper(java.lang.Short newNotifyShopper)
setNotifyShopper in interface ProcessOrderCmdnewNotifyShopper - notify shopper parameter.public void setOrderRn(java.lang.Long anOrderRn)
setOrderRn in interface ProcessOrderCmdanOrderRn - order idpublic void setQuotationSubmission(java.lang.String astrQuotationSubmission)
setQuotationSubmission in interface ProcessOrderCmdastrQuotationSubmission - quotation submission parameter.public void setQuoteExpiredURL(java.lang.String newQuoteExpiredURL)
setQuoteExpiredURL in interface ProcessOrderCmdnewQuoteExpiredURL - URLpublic void setQuoteExpiryPolicy(java.lang.String newQuoteExpiryPolicy)
setQuoteExpiryPolicy in interface ProcessOrderCmdnewQuoteExpiryPolicy - quote expiry policy.public void setReduceParentQuantities(java.lang.String astrReduceParentQuantities)
setReduceParentQuantities in interface ProcessOrderCmdastrReduceParentQuantities - reduce parent quantities parameter.public void setRequestProperties(TypedProperty aRequestProperties) throws ECApplicationException
setRequestProperties in interface ProcessOrderCmdaRequestProperties - com.ibm.commerce.datatype.TypedPropertyECApplicationExceptionpublic void setResponseProperties(TypedProperty aResponseProperties)
aResponseProperties - response properties.public void setTransferMode(java.lang.String transferMode)
setTransferMode in interface ProcessOrderCmdtransferMode - - 0 - order has been transferred without the payment information (shopping cart transfer).
1 - order has been transferred with the payment information (purchase order transfer).public void validateParameters()
throws ECException
validateParameters in interface ECCommandvalidateParameters in class AbstractECTargetableCommandECExceptionpublic java.util.Hashtable getNotificationAttributes()
public void setNotificationAttributes(java.util.Hashtable aNotificationAttributes)
setNotificationAttributes in interface ProcessOrderCmdaNotificationAttributes - The attributes to setpublic OrderAccessBean getOrder()
public java.lang.String getPoNumber()
getPoNumber in interface ProcessOrderCmdpublic void setPoNumber(java.lang.String argPoNumber)
setPoNumber in interface ProcessOrderCmdargPoNumber - The poNumber to set.